]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2001-11-17 06:42:25 by doogie]
authordoogie <>
Sat, 17 Nov 2001 14:42:25 +0000 (06:42 -0800)
committerdoogie <>
Sat, 17 Nov 2001 14:42:25 +0000 (06:42 -0800)
Add support for 'raw' sorting.  This does no grouping based on status or
severity, and just lists bugs in number order.

cgi/common.pl
cgi/pkgreport.cgi

index e071e8261dad4a4f675266ec81768c2da413703c..8c52ef706ed80731a6fc3376ea73cc34ca00a48e 100644 (file)
@@ -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 "<li><a href=\"%s\">#%d: %s</a>\n<br>",
-               bugurl($bug), $bug, htmlsanit($status{subject});
-       $section{$status{pending} . "_" . $status{severity}} .=
-           htmlindexentrystatus(\%status) . "\n";
+       my $html = sprintf "<li><a href=\"%s\">#%d: %s</a>\n<br>",
+           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 .= "<UL>\n" . join("", @rawsort ) . "</UL>\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;
 }
index ec85d4321a282601e36d1ecfe6c03ffaeddb0d6c..103edd3c1521bd3fa07654a07fb8a5ffc6baa4a0 100755 (executable)
@@ -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;