From: justdave%syndicomm.com <> Date: Thu, 9 Aug 2001 13:12:18 +0000 (+0000) Subject: Re-fix for bug 55161 - if data is partial in activity table, prepend a ? to indicate... X-Git-Tag: bugzilla-2.14~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=831030614c615d190a2a2c8b57d6c3b175628f56;p=thirdparty%2Fbugzilla.git Re-fix for bug 55161 - if data is partial in activity table, prepend a ? to indicate that we don't know for sure what got dropped. Patch by Jake Steenhagen r= justdave@syndicomm.com --- diff --git a/CGI.pl b/CGI.pl index 425956370b..2f1a189b3d 100644 --- a/CGI.pl +++ b/CGI.pl @@ -1147,27 +1147,44 @@ sub DumpBugActivity { SendSQL($query); - print "\n"; - print "\n"; - print " \n"; - print "\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 .= "
WhoWhatRemovedAddedWhen
\n"; + $html .= "\n"; + $html .= " \n"; + $html .= "\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 = " " if $removed eq ""; $added = " " if $added eq ""; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; + if ($added =~ /^\?/ || $removed =~ /^\?/) { + $incomplete_data = 1; + } + $html .= "\n"; + $html .= "\n"; + $html .= "\n"; + $html .= "\n"; + $html .= "\n"; + $html .= "\n"; + $html .= "\n"; + } + $html .= "
WhoWhatRemovedAddedWhen
$who$field$removed$added$when
$who$field$removed$added$when
\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 "

\n"; } - print "\n"; + print $html; } diff --git a/checksetup.pl b/checksetup.pl index d5ece7997d..d8414e6c32 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -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;