]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2005-10-09 14:02:24 by ajt]
authorajt <>
Sun, 9 Oct 2005 21:02:24 +0000 (13:02 -0800)
committerajt <>
Sun, 9 Oct 2005 21:02:24 +0000 (13:02 -0800)
add blocked-by/blocks annotations to pkgreport

cgi/pkgreport.cgi

index 86ba75155a899c4c265d33cd67a0e647b447ac38..66b2e22d1601a4eb718ef6fc302b94e4a7cb1932 100755 (executable)
@@ -716,12 +716,12 @@ sub pkg_htmlindexentrystatus {
                  . "</strong>"
                        if (length($status{tags}));
 
-    my @merged= split(/ /,$status{mergedwith});
-    my $mseparator= ";\nMerged with ";
-    for my $m (@merged) {
-        $result .= $mseparator."<A class=\"submitter\" href=\"" . bugurl($m) . "\">#$m</A>";
-        $mseparator= ", ";
-    }
+    $result .= buglinklist(";\nMerged with ", ", ",
+        split(/ /,$status{mergedwith}));
+    $result .= buglinklist(";\nBlocked by ", ", ",
+        split(/ /,$status{blockedby}));
+    $result .= buglinklist(";\nBlocks ", ", ",
+        split(/ /,$status{blocks}));
 
     my $days = 0;
     if (length($status{done})) {
@@ -1095,3 +1095,13 @@ sub get_bug_order_index {
     return -1;
 }
 
+sub buglinklist {
+    my ($prefix, $infix, @els) = @_;
+    my $sep = $prefix;
+    my $r = "";
+    for my $e (@els) {
+        $r .= $sep."<A class=\"submitter\" href=\"" . bugurl($e) . "\">#$e</A>";
+        $sep = $infix;
+    }
+    return $r;
+}