Closed
Bug 616422
Opened 15 years ago
Closed 15 years ago
Pass diffs to bugmail_recipients hook
Categories
(Bugzilla :: Extensions, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.0
People
(Reporter: gerv, Assigned: gerv)
Details
Attachments
(1 file, 1 obsolete file)
2.18 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
[This bug is to suggest a b.m.o. customization/fix for upstreaming. If it is approved, I will create and attach a proper patch.]
The bugmail_recipients hook currently takes the bug and the recipients. In two extensions I have written recently, there has been a need to know what has changed about the bug, i.e. the diffs. We should pass them to the hook as an extra parameter.
Bugzilla::Hook::process('bugmail_recipients',
- { bug => $bug, recipients => \%recipients });
+ { bug => $bug, recipients => \%recipients,
+ diffs => $diffs });
Gerv
![]() |
||
Updated•15 years ago
|
Severity: normal → enhancement
Assignee | ||
Comment 1•15 years ago
|
||
Comment 2•15 years ago
|
||
Comment on attachment 500182 [details] [diff] [review]
Patch v.1
This is fine, although it will also need documentation.
The documentation should state that the format and existence of the "diffs" parameter is subject to change in future releases of Bugzilla. (This is because we plan to have Bugzilla::ChangeSet objects.)
Attachment #500182 -
Flags: review?(mkanat) → review-
Assignee | ||
Comment 3•15 years ago
|
||
Here, merged and with documentation. I didn't change the example code because a) it wasn't changed for the user hash stuff and b) this param is subject to change, so make it copy-and-pasteable isn't so great.
Gerv
Attachment #500182 -
Attachment is obsolete: true
Attachment #507202 -
Flags: review?(mkanat)
Comment 4•15 years ago
|
||
Comment on attachment 507202 [details] [diff] [review]
Patch v.2
>+This is a list of hashes, each hash representing a change to the bug. Each hash has the following members: C<field_name>, C<bug_when>, C<old>, C<new> and C<who> (a L<Bugzilla::User>). If appropriate, there will also be C<attach_id> or C<comment_id>; if either is present, there will be C<isprivate>. See the C<_get_diffs> function to see exactly how it is populated. Warning: the format and existence of the "diffs" parameter is subject to change in future releases of Bugzilla.
This appears to be one super-long line that should be broken up into 80 character lines.
You'll want to say: C<_get_diffs> in F<Bugzilla/BugMail.pm>.
With those two things fixed, this is r+.
I agree with your rationale for not putting in example code, that's totally sensible.
Attachment #507202 -
Flags: review?(mkanat) → review+
Updated•15 years ago
|
Flags: approval4.0+
Flags: approval+
Target Milestone: --- → Bugzilla 4.0
Assignee | ||
Comment 5•15 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/BugMail.pm
modified Bugzilla/Hook.pm
Committed revision 7678.
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.0/
modified Bugzilla/BugMail.pm
modified Bugzilla/Hook.pm
Committed revision 7536.
Gerv
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•