]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Split forwarded on commas for linking
authorDebian BTS <debbugs@spohr>
Tue, 12 Sep 2006 09:10:38 +0000 (02:10 -0700)
committerDebian BTS <debbugs@spohr>
Tue, 12 Sep 2006 09:10:38 +0000 (02:10 -0700)
 * Do not display duplicate bugs
 * Display links to archived bugs

cgi/bugreport.cgi
cgi/pkgreport.cgi
debian/changelog

index a5691558a9229a3996b7b09e65f8dee56b076e25..be375255af875e285d9a983b09d4f0bfb15372ae 100755 (executable)
@@ -405,9 +405,9 @@ sub handle_record{
          # Add links to merged bugs
          $output =~ s{(?<=Merged )([\d\s]+)(?=\.)}{join(' ',map {bug_links($_)} (split /\s+/, $1))}eo;
          # Add links to blocked bugs
-         $output =~ s{(?<=Blocking bugs)(?:(of )(\d+))?( (?:added|set to|removed):\s+)([\d\s]+)}
+         $output =~ s{(?<=Blocking bugs)(?:(of )(\d+))?( (?:added|set to|removed):\s+)([\d\s\,]+)}
                      {(defined $2?$1.bug_links($2):'').$3.
-                           join(' ',map {bug_links($_)} (split /\s+/, $4))}eo;
+                           join(' ',map {bug_links($_)} (split /\,?\s+/, $4))}eo;
          # Add links to reassigned packages
          $output =~ s{(Bug reassigned from package \`)([^\']+)(' to \`)([^\']+)(')}
          {$1.q(<a href=").pkgurl($2).qq(">$2</a>).$3.q(<a href=").pkgurl($4).qq(">$4</a>).$5}eo;
index 569bd5c7e4f55a2d38eedb2197cb501ae7df8b60..bd0d275e96efbba56572e12d8cf15ddb853fff70 100755 (executable)
@@ -365,6 +365,11 @@ $title = htmlsanit($title);
 my @names; my @prior; my @title; my @order;
 determine_ordering();
 
+# strip out duplicate bugs
+my %bugs;
+@bugs{@bugs} = @bugs;
+@bugs = keys %bugs;
+
 my $result = pkg_htmlizebugs(\@bugs);
 
 print "Content-Type: text/html; charset=utf-8\n\n";
@@ -433,11 +438,6 @@ if (defined $pkg || defined $src) {
                 push @references, sprintf "to the source package <a href=\"%s\">%s</a>'s bug page", srcurl($srcforpkg), htmlsanit($srcforpkg);
             }
         }
-        if ($pkg) {
-            set_option("archive", !$archive);
-            push @references, sprintf "to the <a href=\"%s\">%s reports for %s</a>", pkgurl($pkg), ($archive ? "active" : "archived"), htmlsanit($pkg);
-            set_option("archive", $archive);
-        }
         if (@references) {
             $references[$#references] = "or $references[$#references]" if @references > 1;
             print "<p>You might like to refer ", join(", ", @references), ".</p>\n";
@@ -462,6 +462,16 @@ if (defined $pkg || defined $src) {
     print "different addresses.\n";
 }
 
+set_option("archive", !$archive);
+print "<p>See the <a href=\"%s\">%s reports</a></p>",
+     urlsanit('pkgreport.cgi?'.join(';',
+                                   map {$_ eq 'archived'?():("$_=$param{$_}")
+                                   } keys %param,
+                                   ('archived='.$archive?"yes":"no")
+                                  )
+            ), ($archive ? "active" : "archived");
+set_option("archive", $archive);
+
 print $result if $showresult;
 
 print pkg_javascript() . "\n";
@@ -642,7 +652,10 @@ sub pkg_htmlindexentrystatus {
     unless (length($status{done})) {
         if (length($status{forwarded})) {
             $result .= ";\n<strong>Forwarded</strong> to "
-                       . maybelink($status{forwarded});
+                       . join(', ',
+                             map {maybelink($_)}
+                             split /,\s*/,$status{forwarded}
+                            );
         }
         my $daysold = int((time - $status{date}) / 86400);   # seconds to days
         if ($daysold >= 7) {
index 2cc915aacce359a01845f0d52fb5a3c618762384..78e00625065d7e2672fb89a7f5b48227dd99a27c 100644 (file)
@@ -124,6 +124,9 @@ debbugs (2.4.2) UNRELEASED; urgency=low
     - Explain how to close bugs in the ack message (closes: #37605)
     - Make the moreinfo ack more general (closes: #70810)
     - Use RFC compliant dates in headers (closes: #362935)
+    - Split forwarded on commas for linking (closes: #367813)
+    - Don't display duplicate bugs (closes: #348116)
+    - Display links to archived bugs for all searches (closes: #53710)
 
   
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100