Closed
Bug 670906
Opened 14 years ago
Closed 14 years ago
delta_ts is updated even when there are no changes
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: gerv, Assigned: gerv)
References
Details
Attachments
(1 file)
928 bytes,
patch
|
timello
:
review+
|
Details | Diff | Splinter Review |
delta_ts is updated by Bug.update() even when there are no changes. This is a regression on the tip, caused by the checkin for bug 620827.
http://bzr.mozilla.org/bugzilla/trunk/revision/7699
Tiago removed the @ signs in the line (around 964):
if (scalar @$removed_see || scalar @$added_see) {
->
if (scalar $removed_see || scalar $added_see) {
Because those two variables are arrayrefs, those checks always now pass, rather than depending on whether the arrays have anything in them. Which means that $changes->{see_also} is always populated (albeit with an empty arrayref), which means that, later down the file, the test to see if there were any changes always passes, so delta_ts is always updated.
This bug was found by the BzAPI regression test suite.
Patch forthcoming.
Gerv
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Attachment #545365 -
Flags: review? → review?(timello)
Comment 2•14 years ago
|
||
Comment on attachment 545365 [details] [diff] [review]
Patch v.1
Review of attachment 545365 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you!
::: Bugzilla/Bug.pm
@@ +960,5 @@
> $_->remove_from_db foreach @$removed_see;
> $_->insert_create_data($_) foreach @$added_see;
>
> # If any changes were found, record it in the activity log
> + if (scalar @$removed_see || scalar @$added_see) {
Oh indeed! That's true.
Attachment #545365 -
Flags: review?(timello) → review+
Updated•14 years ago
|
Flags: approval?
![]() |
||
Updated•14 years ago
|
Depends on: 620827
Flags: blocking4.2+
Flags: approval?
Flags: approval+
Target Milestone: --- → Bugzilla 4.2
Version: unspecified → 4.1.2
Assignee | ||
Comment 3•14 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Bug.pm
Committed revision 7857.
Gerv
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•