summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-01-22 13:24:39 +0100
committerterry%mozilla.org <>2000-01-22 13:24:39 +0100
commit6dcda41d4c40a5617757a3b0ec9bbaeebfde6b55 (patch)
treee2b74fd808d5610777a93047ef4a09e07070ac46 /process_bug.cgi
parent77613d1fc5ca11bca00d1e530d3d1847c9ba24d3 (diff)
downloadbugzilla-6dcda41d4c40a5617757a3b0ec9bbaeebfde6b55.tar.gz
bugzilla-6dcda41d4c40a5617757a3b0ec9bbaeebfde6b55.tar.xz
Added a new table fielddefs that records information about the
different fields we keep an activity log on. The bugs_activity table now has a pointer into that table instead of recording the name directly. Set up a new, highly experimental email-notification scheme. To turn it on, the maintainer has to turn on the "New email tech" param, and then individual users have to turn on the "New email tech" preference.
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi20
1 files changed, 16 insertions, 4 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 027579cee..e61fb39b2 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -464,7 +464,10 @@ sub LogDependencyActivity {
my ($i, $oldstr, $target, $me) = (@_);
my $newstr = SnapShotDeps($i, $target, $me);
if ($oldstr ne $newstr) {
- SendSQL("insert into bugs_activity (bug_id,who,bug_when,field,oldvalue,newvalue) values ($i,$whoid,$timestamp,'$target','$oldstr','$newstr')");
+ my $fieldid = GetFieldID($target);
+ SendSQL("INSERT INTO bugs_activity " .
+ "(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " .
+ "($i,$whoid,$timestamp,$fieldid,'$oldstr','$newstr')");
return 1;
}
return 0;
@@ -476,7 +479,7 @@ sub LogDependencyActivity {
#
foreach my $id (@idlist) {
my %dependencychanged;
- SendSQL("lock tables bugs write, bugs_activity write, cc write, profiles write, dependencies write, votes write, keywords write, longdescs write, keyworddefs read");
+ SendSQL("lock tables bugs write, bugs_activity write, cc write, profiles write, dependencies write, votes write, keywords write, longdescs write, fielddefs write, keyworddefs read");
my @oldvalues = SnapShotBug($id);
if (defined $::FORM{'delta_ts'} && $::FORM{'delta_ts'} ne $delta_ts) {
@@ -628,6 +631,15 @@ The changes made were:
foreach my $ccid (keys %ccids) {
SendSQL("insert into cc (bug_id, who) values ($id, $ccid)");
}
+ my $newcclist = ShowCcList($id);
+ if ($newcclist ne $origcclist) {
+ my $col = GetFieldID('cc');
+ my $origq = SqlQuote($origcclist);
+ my $newq = SqlQuote($newcclist);
+ SendSQL("INSERT INTO bugs_activity " .
+ "(bug_id,who,bug_when,fieldid,oldvalue,newvalue) VALUES " .
+ "($id,$whoid,'$timestamp',$col,$origq,$newq)");
+ }
}
@@ -713,10 +725,10 @@ The changes made were:
RemoveVotes($id,
"This bug has been moved to a different product");
}
- $col = SqlQuote($col);
+ $col = GetFieldID($col);
$old = SqlQuote($old);
$new = SqlQuote($new);
- my $q = "insert into bugs_activity (bug_id,who,bug_when,field,oldvalue,newvalue) values ($id,$whoid,'$timestamp',$col,$old,$new)";
+ my $q = "insert into bugs_activity (bug_id,who,bug_when,fieldid,oldvalue,newvalue) values ($id,$whoid,'$timestamp',$col,$old,$new)";
# puts "<pre>$q</pre>"
SendSQL($q);
}