From 3f1779031da41e361847d800b135be70ed7babeb Mon Sep 17 00:00:00 2001 From: doogie <> Date: Sat, 17 Nov 2001 06:42:25 -0800 Subject: [PATCH] [project @ 2001-11-17 06:42:25 by doogie] Add support for 'raw' sorting. This does no grouping based on status or severity, and just lists bugs in number order. --- cgi/common.pl | 17 ++++++++++++----- cgi/pkgreport.cgi | 2 ++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/cgi/common.pl b/cgi/common.pl index e071e82..8c52ef7 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -7,6 +7,7 @@ my $common_archive = 0; my $common_repeatmerged = 1; my %common_include = (); my %common_exclude = (); +my $common_raw_sort = 0; my $debug = 0; @@ -16,6 +17,7 @@ sub set_option { if ($opt eq "repeatmerged") { $common_repeatmerged = $val; } if ($opt eq "exclude") { %common_exclude = %{$val}; } if ($opt eq "include") { %common_include = %{$val}; } + if ($opt eq "raw") { $common_raw_sort = $val; } } sub readparse { @@ -227,6 +229,7 @@ sub allbugs { sub htmlizebugs { $b = $_[0]; my @bugs = @$b; + my @rawsort; my %section = (); @@ -270,15 +273,18 @@ sub htmlizebugs { next unless ($okay); } - $section{$status{pending} . "_" . $status{severity}} .= - sprintf "
  • #%d: %s\n
    ", - bugurl($bug), $bug, htmlsanit($status{subject}); - $section{$status{pending} . "_" . $status{severity}} .= - htmlindexentrystatus(\%status) . "\n"; + my $html = sprintf "
  • #%d: %s\n
    ", + bugurl($bug), $bug, htmlsanit($status{subject}); + $html .= htmlindexentrystatus(\%status) . "\n"; + $section{$status{pending} . "_" . $status{severity}} .= $html; + push @rawsort, $html if $common_raw_sort; } my $result = ""; my $anydone = 0; + if ($common_raw_sort) { + $result .= "\n"; + } else { foreach my $pending (qw(pending forwarded pending-fixed fixed done)) { foreach my $severity(@debbugs::gSeverityList) { $severity = $debbugs::gDefaultSeverity if ($severity eq ''); @@ -293,6 +299,7 @@ sub htmlizebugs { } } + } $result .= $debbugs::gHTMLExpireNote if ($anydone); return $result; } diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index ec85d43..103edd3 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -32,6 +32,7 @@ my $repeatmerged = ($param{'repeatmerged'} || "yes") eq "yes"; my $archive = ($param{'archive'} || "no") eq "yes"; my $include = $param{'include'} || ""; my $exclude = $param{'exclude'} || ""; +my $raw_sort = ($param{'raw'} || "no") eq "yes"; my $Archived = $archive ? " Archived" : ""; @@ -54,6 +55,7 @@ set_option("include", { map {if (m/^(.*):(.*)$/) { ($1,$2) } else { ($_,1) }} (s if ($include); set_option("exclude", { map {if (m/^(.*):(.*)$/) { ($1,$2) } else { ($_,1) }} (split /[\s,]+/, $exclude) }) if ($exclude); +set_option("raw", $raw_sort); my $tag; my @bugs; -- 2.39.2