Closed Bug 812420 Opened 12 years ago Closed 12 years ago

When creating a needinfo request and a comment at the same time, comment is added twice

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: dkl)

References

Details

Attachments

(1 file, 1 obsolete file)

Due to a recent change in the Needinfo extension (http://bzr.mozilla.org/bmo/4.0/revision/8378) to honor the requestee_cc preference, comments can sometimes be added twice when requesting information. See bug 802545 comment 28 and comment 31. We need to update the extension to manually update the cc list of a bug based on the requestees user preference.
Not as quick of a fix as I originally thought but it gets the job done. Please review.

dkl
Attachment #682337 - Flags: review?(glob)
i was thinking about this over the weekend; perhaps it would be simpler to add a new hook to the start of Bugzilla::Bug->update() after SUPER::update() is called, to make the flag changes.

that should remove the CC code duplication, as well as the manual calls to update_flags and LogActivityEntry.
Comment on attachment 682337 [details] [diff] [review]
Patch to manually add requestee to cc if their preference is set (v1)

r=glob

if it pans out that the "earlier bug hook" idea isn't trivial, i'm happy for this patch to be committed to address the immediate problem.
Attachment #682337 - Flags: review?(glob) → review+
This also fixes the issue by adding a new hook as you suggested earlier in the update process. New hook called 'bug_start_of_update' added in $bug->update. If you can think of a better name for the hook, go for it :) I no longer need to call LogActivityEntry in Extension.pm as well as there is no need for code to add a cc user as it happens properly now.

If review is r+ go ahead and check in and get it pushed out. If you find any issues with it, feel free to go with the prior patch.

dkl
Attachment #683296 - Flags: review?(glob)
Attachment #682337 - Attachment is obsolete: true
Comment on attachment 683296 [details] [diff] [review]
Patch to fix needinfo double comment and auto requestee cc (v1)

r=glob

beautiful.
Attachment #683296 - Flags: review?(glob) → review+
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.0/
modified Bugzilla/Bug.pm
modified extensions/Needinfo/Extension.pm
Committed revision 8391.

Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified Bugzilla/Bug.pm
modified extensions/Needinfo/Extension.pm
Committed revision 8417.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: Extensions: Needinfo → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: