From c682dad3702a575e6a813c6ed6c45f0a5f489dcd Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 11 Apr 2018 16:31:21 -0700 Subject: [PATCH] use get_bug_statuses --- Debbugs/CGI/Pkgreport.pm | 45 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/Debbugs/CGI/Pkgreport.pm b/Debbugs/CGI/Pkgreport.pm index 20d0a79..c73cb1d 100644 --- a/Debbugs/CGI/Pkgreport.pm +++ b/Debbugs/CGI/Pkgreport.pm @@ -355,28 +355,29 @@ sub pkg_htmlizebugs { } my $binary_to_source_cache = {}; - foreach my $bug (@bugs) { - my %status = %{get_bug_status(bug=>$bug, - (map {exists $param{$_}?($_,$param{$_}):()} - qw(dist version schema bugusertags) - ), - (exists $param{arch}?(arch => $param{arch}):(arch => $config{default_architectures})), - binary_to_source_cache => $binary_to_source_cache, - )}; - next unless %status; - next if bug_filter(bug => $bug, - status => \%status, - repeat_merged => $param{repeatmerged}, - seen_merged => \%seenmerged, - (keys %include ? (include => \%include):()), - (keys %exclude ? (exclude => \%exclude):()), - ); - - my $html = "
  • "; ##%d: %s\n
    ", - $html .= short_bug_status_html(status => \%status, - options => $param{options}, - ) . "\n"; - push @status, [ $bug, \%status, $html ]; + my $statuses = + get_bug_statuses(bug => \@bugs, + (map {exists $param{$_}?($_,$param{$_}):()} + qw(dist version schema bugusertags) + ), + (exists $param{arch}?(arch => $param{arch}):(arch => $config{default_architectures})), + binary_to_source_cache => $binary_to_source_cache, + ); + for my $bug (keys %{$statuses}) { + next unless %{$statuses->{$bug}}; + next if bug_filter(bug => $bug, + status => $statuses->{$bug}, + repeat_merged => $param{repeatmerged}, + seen_merged => \%seenmerged, + (keys %include ? (include => \%include):()), + (keys %exclude ? (exclude => \%exclude):()), + ); + + my $html = "
  • "; ##%d: %s\n
    ", + $html .= short_bug_status_html(status => $statuses->{$bug}, + options => $param{options}, + ) . "\n"; + push @status, [ $bug, $statuses->{$bug}, $html ]; } if ($param{bug_order} eq 'age') { # MWHAHAHAHA -- 2.39.2