]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Re-fix for bug 55161 - if data is partial in activity table, prepend a ? to indicate...
authorjustdave%syndicomm.com <>
Thu, 9 Aug 2001 13:12:18 +0000 (13:12 +0000)
committerjustdave%syndicomm.com <>
Thu, 9 Aug 2001 13:12:18 +0000 (13:12 +0000)
Patch by Jake Steenhagen <jake@acutex.net>
r= justdave@syndicomm.com

CGI.pl
checksetup.pl

diff --git a/CGI.pl b/CGI.pl
index 425956370b1f5a4a5408c685473b33f4ac7d73aa..2f1a189b3d88c88c2d8d99ce3dc3d93858e44f47 100644 (file)
--- a/CGI.pl
+++ b/CGI.pl
@@ -1147,27 +1147,44 @@ sub DumpBugActivity {
 
     SendSQL($query);
     
-    print "<table border cellpadding=4>\n";
-    print "<tr>\n";
-    print "    <th>Who</th><th>What</th><th>Removed</th><th>Added</th><th>When</th>\n";
-    print "</tr>\n";
+    # Instead of outright printing this, we are going to store it in a $html
+    # variable and print it and the end.  This is so we can explain ? (if nesc.)
+    # at the top of the activity table rather than the botom.
+    my $html = "";
+    $html .= "<table border cellpadding=4>\n";
+    $html .= "<tr>\n";
+    $html .= "    <th>Who</th><th>What</th><th>Removed</th><th>Added</th><th>When</th>\n";
+    $html .= "</tr>\n";
     
     my @row;
+    my $incomplete_data = 0;
     while (@row = FetchSQLData()) {
         my ($field,$when,$removed,$added,$who) = (@row);
         $removed = html_quote($removed);
         $added = html_quote($added);
         $removed = "&nbsp;" if $removed eq "";
         $added = "&nbsp;" if $added eq "";
-        print "<tr>\n";
-        print "<td>$who</td>\n";
-        print "<td>$field</td>\n";
-        print "<td>$removed</td>\n";
-        print "<td>$added</td>\n";
-        print "<td>$when</td>\n";
-        print "</tr>\n";
+        if ($added =~ /^\?/ || $removed =~ /^\?/) {
+            $incomplete_data = 1;
+        }
+        $html .= "<tr>\n";
+        $html .= "<td>$who</td>\n";
+        $html .= "<td>$field</td>\n";
+        $html .= "<td>$removed</td>\n";
+        $html .= "<td>$added</td>\n";
+        $html .= "<td>$when</td>\n";
+        $html .= "</tr>\n";
+    }
+    $html .= "</table>\n";
+    if ($incomplete_data) {
+        print "There was a bug in older versions of Bugzilla which caused activity data \n";
+        print "to be lost if there was a large number of cc's or dependencies.  That \n";
+        print "has been fixed, however, there was some data already lost on this bug \n";
+        print "that could not be regenerated.  The changes that the script could not \n";
+        print "reliably determine are prefixed by '?'\n";
+        print "<p>\n";
     }
-    print "</table>\n";
+    print $html;
 }
 
 
index d5ece7997ddf67849ec4cc853a444a4d99b13ebe..d8414e6c3224b554cc3ea6563354add17844d415 100755 (executable)
@@ -2431,6 +2431,12 @@ if (GetFieldDef('bugs_activity', 'oldvalue')) {
                 $added = "?";
                 $removed = "?";
             }
+            # If the origianl field (old|new)value was full, then this
+            # could be incomplete data.
+            if (length($oldvalue) == 255 || length($newvalue) == 255) {
+                $added = "? $added";
+                $removed = "? $removed";
+            }
         } else {
             $removed = $oldvalue;
             $added = $newvalue;