Closed
Bug 587793
Opened 14 years ago
Closed 14 years ago
Add "object_end_of_create" hook so that extensions can operate on any new objects
Categories
(Bugzilla :: Extensions, enhancement)
Bugzilla
Extensions
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: christian, Assigned: christian)
Details
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
christian
:
review+
|
Details | Diff | Splinter Review |
There's currently "bug_end_of_create", "group_end_of_create, etc...but no "object_end_of_create". It would be useful to have the object one, as I am trying to send events for every new object (not just bugs). I see there is already "object_end_of_update", so this is rounding it out a bit.
Attachment #466422 -
Flags: review?(mkanat)
Updated•14 years ago
|
Severity: normal → enhancement
Comment 2•14 years ago
|
||
Comment on attachment 466422 [details] [diff] [review]
Add object_create_hook
It needs to be at the end of insert_create_data, so that subclasses that use the three methods instead also call it.
Also, it needs documentation and example code.
Attachment #466422 -
Flags: review?(mkanat) → review-
Updated•14 years ago
|
Target Milestone: --- → Bugzilla 3.6
Attachment #466422 -
Attachment is obsolete: true
Attachment #466459 -
Flags: review?(mkanat)
Comment 4•14 years ago
|
||
Comment on attachment 466459 [details] [diff] [review]
Add object_create_hook, with review changes
>=== modified file 'Bugzilla/Hook.pm'
>+The changed object, with all fields set to their updated values.
The object that was just created.
That can be fixed on checkin.
Attachment #466459 -
Flags: review?(mkanat) → review+
Updated•14 years ago
|
Flags: approval4.0+
Flags: approval3.6+
Flags: approval+
Yeah, I thought that was weird, but I copied it from http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/Hook.html#bug_end_of_create. I updated the comment and fixed the one for bug_end_of_create as well.
Attachment #466459 -
Attachment is obsolete: true
Comment on attachment 466472 [details] [diff] [review]
Add object_create_hook, with review changes & documention fix to bug_end_of_create
Carrying r+ over to new patch
Attachment #466472 -
Flags: review+
Comment 7•14 years ago
|
||
-=item C<bug> - The changed bug object, with all fields set to their updated
+=item C<bug> - The created bug object.
values.
I guess you should remove the "values.".
Comment 8•14 years ago
|
||
(In reply to comment #7)
> I guess you should remove the "values.".
Yes, he is right. Please fix the POD.
Removed the stray word, carrying review forward
Attachment #466472 -
Attachment is obsolete: true
Attachment #470937 -
Flags: review+
Attachment #466472 -
Flags: review+
Comment 10•14 years ago
|
||
Thanks for the new hook, Christian! :-)
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Hook.pm
modified Bugzilla/Object.pm
modified extensions/Example/Extension.pm
Committed revision 7458.
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.0/
modified Bugzilla/Hook.pm
modified Bugzilla/Object.pm
modified extensions/Example/Extension.pm
Committed revision 7393.
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/3.6/
modified Bugzilla/Hook.pm
modified Bugzilla/Object.pm
modified extensions/Example/Extension.pm
Committed revision 7167.
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
•