- $bug_status->{log_modified} =
- DateTime::Format::Pg->
- parse_datetime($bug_status->{log_modified})->
- epoch;
- $bug_status->{date} =
- DateTime::Format::Pg->
- parse_datetime($bug_status->{date})->
- epoch;
- $bug_status->{last_modified} =
- DateTime::Format::Pg->
- parse_datetime($bug_status->{last_modified})->
- epoch;
+ $bug_status->{location} = $bug_status->{archived}?'archive':'db-h';
+ for my $field (qw(found_versions fixed_versions found_date fixed_date)) {
+ $bug_status->{$field} = [split ' ', $bug_status->{$field} // ''];
+ }
+ for my $field (qw(found fixed)) {
+ # create the found/fixed hashes which indicate when a
+ # particular version was marked found or marked fixed.
+ @{$bug_status->{$field}}{@{$bug_status->{"${field}_versions"}}} =
+ (('') x (@{$bug_status->{"${field}_versions"}} -
+ @{$bug_status->{"${field}_date"}}),
+ @{$bug_status->{"${field}_date"}});
+ }
+ $bug_status->{id} = $bug_status->{bug_num};