Closed Bug 99519 Opened 23 years ago Closed 23 years ago

Invalid timestamp in cc, no e-mail

Categories

(Bugzilla :: Creating/Changing Bugs, defect, P1)

2.14
defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: marcel, Assigned: myk)

References

Details

Attachments

(1 file, 3 obsolete files)

When you add yourself only as cc to any bug, this activity is logged with bad timestamp (previous last activity timestamp is used intead of current time) and e-mail to particular persons is not sent.
Added cc with Additional Comment (testing this bug).
Removed myself from cc.
This bugzilla installation seems ok. But my installation have this bug... :-(
Have you made any changes to the code?
No. I have configured my bugzilla installation only via changes in localconfig file and through web interface. Note: This bug was present in my bugzilla-2.12 too.
What OS do you have it running on?
RedHat Linux 7.0 with some packages upgraded (from RHL 7.1).
Moving to future until we can reproduce this.
Priority: -- → P5
Target Milestone: --- → Future
We have now our bugzilla available from inet. Please see https://bugzilla.etc.sk/show_bug.cgi?id=20 We are using mysql-3.23.32-1.7 installed from rpm package.
*** Bug 100905 has been marked as a duplicate of this bug. ***
OK, we have two more sites that can reproduce this now, both under control of core developers. Ought to be able to track it down now...
Severity: normal → critical
Priority: P5 → P1
Target Milestone: Future → Bugzilla 2.16
many thanks to Brad Baetz for tracking this down... turns out to be a difference in the way MySQL 3.23 handles timestamp fields compared to 3.22. In 3.22 if you so much as touch a row with an UPDATE statement, it updates the timestamp field. In 3.23, the timestamp field is not updated unless the data actually changes. (So setting a row to the values it already had won't update it). CCs and dependencies thus would both have this same problem.
s/row/column in the row with a mediumtext (At least)/ Stranger and stranger...
This is going to be a blocker for the 2.16 release
Severity: critical → blocker
Blocks: 103885
Comment on attachment 54432 [details] [diff] [review] Always update delta_ts if anything gets logged to the activity table $bug_changed is being set inside the wrong routine, should be in the main logactivityentry routine and not in logdependencyactivity.
Attachment #54432 - Attachment is obsolete: true
Attachment #54432 - Flags: review-
Attached patch Patch v2 (obsolete) — Splinter Review
Comment on attachment 56329 [details] [diff] [review] Patch v2 r=bbaetz I tested this on mysql 3.23; someone should probably check on 3.22
Attachment #56329 - Flags: review+
Comment on attachment 56329 [details] [diff] [review] Patch v2 >Index: process_bug.cgi ... > SendSQL("INSERT INTO bugs_activity " . > "(bug_id,who,bug_when,fieldid,removed,added) VALUES " . > "($i,$whoid,$timestamp,$fieldid,$removestr,$addstr)"); >+ $bug_changed = 1; ... >+ if ($bug_changed) { >+ SendSQL("UPDATE bugs SET delta_ts = NULL WHERE bug_id = $id"); >+ } This still has problems, when LogActivityEntry() is called, it still has the old value for $timestamp. I suspect this is caused by the code at: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/webtools/bugzilla/process_bug.cgi&rev=1.103&mark=1128-1134#1124 But I'm not sure what the solution is (my brain doesn't work quite right at 2:30 AM :)
Attachment #56329 - Flags: review-
That's on purpose so that every change logged to the bug as part of the same action gets stamped with the same time. Since the final statement there is setting the timestamp on the bug itself (not the activity log) at the current time (which is probably a half a second or so after the timestamp used in the activity log) this is not a problem, since it's STILL after the last lastdiffed time, which is the important thing here.
No longer blocks: 103885
No, this is correct behaviour. The second time may be too late (by some seconds); that doesn't matter, because its later, not earlier, so midairs still work.
Attachment #56329 - Attachment is obsolete: true
Attached patch Patch v3 (obsolete) — Splinter Review
Turns out that besides the timestamp not updating when nothing changed, there were fundamental flaws in the way process_bug was generating the timestamp being used in the activity log. It now always uses NOW() as the timestamp, whether or not it's submitting anything to the bug to be changed (because it almost always does - and usually just sets those to the same values, which means delta_ts won't auto-update under MySQL 3.23).
Attached patch Patch v4Splinter Review
new attachment uses $timestamp instead of NULL to reset delta_ts
Attachment #56993 - Attachment is obsolete: true
Comment on attachment 56996 [details] [diff] [review] Patch v4 r= jake and bbaetz in IRC while bugzilla was down
Attachment #56996 - Flags: review+
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.105; previous revision: 1.104
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: