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)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: marcel, Assigned: myk)
References
Details
Attachments
(1 file, 3 obsolete files)
1.87 KB,
patch
|
justdave
:
review+
justdave
:
review+
|
Details | Diff | Splinter Review |
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.
Reporter | ||
Comment 1•23 years ago
|
||
Added cc with Additional Comment (testing this bug).
Reporter | ||
Comment 2•23 years ago
|
||
Removed myself from cc.
Reporter | ||
Comment 3•23 years ago
|
||
This bugzilla installation seems ok. But my installation have this bug... :-(
Comment 4•23 years ago
|
||
Have you made any changes to the code?
Reporter | ||
Comment 5•23 years ago
|
||
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.
Comment 6•23 years ago
|
||
What OS do you have it running on?
Reporter | ||
Comment 7•23 years ago
|
||
RedHat Linux 7.0 with some packages upgraded (from RHL 7.1).
Comment 8•23 years ago
|
||
Moving to future until we can reproduce this.
Priority: -- → P5
Target Milestone: --- → Future
Reporter | ||
Comment 9•23 years ago
|
||
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.
Comment 10•23 years ago
|
||
*** Bug 100905 has been marked as a duplicate of this bug. ***
Comment 11•23 years ago
|
||
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
Comment 12•23 years ago
|
||
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.
Comment 13•23 years ago
|
||
Comment 14•23 years ago
|
||
s/row/column in the row with a mediumtext (At least)/
Stranger and stranger...
Comment 15•23 years ago
|
||
This is going to be a blocker for the 2.16 release
Severity: critical → blocker
Comment 16•23 years ago
|
||
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-
Comment 17•23 years ago
|
||
Comment 18•23 years ago
|
||
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 19•23 years ago
|
||
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-
Comment 20•23 years ago
|
||
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.
Comment 21•23 years ago
|
||
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.
Updated•23 years ago
|
Attachment #56329 -
Attachment is obsolete: true
Comment 22•23 years ago
|
||
Comment 23•23 years ago
|
||
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).
Comment 24•23 years ago
|
||
new attachment uses $timestamp instead of NULL to reset delta_ts
Updated•23 years ago
|
Attachment #56993 -
Attachment is obsolete: true
Comment 25•23 years ago
|
||
Comment on attachment 56996 [details] [diff] [review]
Patch v4
r= jake and bbaetz in IRC while bugzilla was down
Attachment #56996 -
Flags: review+
Comment 26•23 years ago
|
||
/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
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•