my %param = validate_with(params => \@_,
spec => $spec,
);
+ my $bin_to_src_cache = {};
+ if (defined $param{binary_to_source_cache}) {
+ $bin_to_src_cache = $param{binary_to_source_cache};
+ }
my %status;
my %statuses;
if (defined $param{schema}) {
}
$bug_status->{keywords} =
$bug_status->{tags};
- $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} // ''];
exists $param{bug_index}{$bug}) {
my %status = %{$param{bug_index}{$bug}};
$status{pending} = $status{status};
- $status{id} = $param{bug};
+ $status{id} = $bug;
$statuses{$bug} = \%status;
}
elsif (defined $param{status} and
my $location = getbuglocation($bug, 'summary');
next if not defined $location or not length $location;
my %status = %{ readbug( $bug, $location ) };
+ $status{id} = $bug;
$statuses{$bug} = \%status;
}
}
$status->{source} = binary_to_source(binary=>[split /\s*,\s*/, $status->{package}],
source_only => 1,
- exists $param{binary_to_source_cache}?
- (cache =>$param{binary_to_source_cache}):(),
+ cache => $bin_to_src_cache,
+ defined $param{schema}?
+ (schema => $param{schema}):(),
);
$status->{"package"} = 'unknown' if ($status->{"package"} eq '');