Closed
Bug 298196
Opened 20 years ago
Closed 20 years ago
process_bug.cgi updates delta_ts even when no modifications are made
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file)
1.21 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
The culprits are votes and keywords, see my patch.
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 2.20
Version: unspecified → 2.19.3
Assignee | ||
Comment 1•20 years ago
|
||
Fix two problems:
1) process_bug.cgi has no idea if the "keywords" field has changed or not till
it checks all fields at the end of the process. Thus, delta_ts should not be
updated while this information is unknown.
2) For bugs having no votes, votes = 0 (as expected). But the code incorrectly
set $votes ||= '' which is wrong for this numeric field.
Assignee | ||
Updated•20 years ago
|
Attachment #186766 -
Flags: review?(mkanat)
Comment 2•20 years ago
|
||
Comment on attachment 186766 [details] [diff] [review]
patch, v1
>- SendSQL("UPDATE bugs SET delta_ts = $sql_timestamp, keywords = " .
>- SqlQuote(join(', ', @list)) .
>- " WHERE bug_id = $id");
>+ $dbh->do("UPDATE bugs SET keywords = ? WHERE bug_id = ?",
>+ undef, join(', ', @list), $id);
OK. So if I only update the keywords, with this patch applied, the delta_ts
is still set correctly? Provided that's the case, thi is r+ on inspection.
>- $newvalues[$i] ||= '';
>+ $newvalues[$i] = defined($newvalues[$i]) ? $newvalues[$i] : '';
And yeah, this is obviously correct. It *actually* does what the comment
says, now. :-)
Attachment #186766 -
Flags: review?(mkanat) → review+
Assignee | ||
Comment 3•20 years ago
|
||
(In reply to comment #2)
> OK. So if I only update the keywords, with this patch applied, the delta_ts
> is still set correctly?
Yes, but later in the code, where we have checked that keywords have really been
changed.
Flags: approval?
Updated•20 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 4•20 years ago
|
||
Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi
new revision: 1.260; previous revision: 1.259
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•