Closed Bug 398420 Opened 17 years ago Closed 17 years ago

Midair collision protection is broken

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

3.1.2
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: LpSolit, Assigned: LpSolit)

Details

(Keywords: regression)

Attachments

(1 file)

Attached patch patch, v1Splinter Review
$bug->update() doesn't update bugs.delta_ts in the DB, and process_bug.cgi only updates it itself when editing groups or adding comments. In all other cases, it doesn't. So if you edit everything you want except groups and comments, no midair collision occurs and older changes are overwritten. I fixed $bug->update and $bug->update_keywords in such a way that delta_ts is only updated if something really changed.
Flags: blocking3.1.3+
Attachment #283375 - Flags: review?(mkanat)
Comment on attachment 283375 [details] [diff] [review] patch, v1 >Index: Bugzilla/Bug.pm >+ # If any change occured, refresh the timestamp of the bug. Nit: occurred >+ if (scalar(keys %$changes) || scalar(@{$self->{added_comments} || []})) { You don't have to do "keys", you can just do scalar against the hash. You also only have to check if added_comments is defined, I'm pretty sure, because it won't be defined if there weren't any added comments. You can fix all these things on checkin.
Attachment #283375 - Flags: review?(mkanat) → review+
Flags: approval+
I didn't remove keys as the output of |scalar %hash| is a bit weird when the hash is not empty. I fixed everything else. Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.204; previous revision: 1.203 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: