Closed
Bug 521373
Opened 16 years ago
Closed 16 years ago
Create an object-before_create hook
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
(Whiteboard: [es-ita])
Attachments
(1 file, 2 obsolete files)
|
3.36 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
In general, it's pretty silly to have a before_create hook for each individual subclass of Bugzilla::Object, because before_create in the subclass would happen at the same time as before_create in Bugzilla::Object. People can just use $class->isa() to determine what class they're updating, using one central hook.
| Assignee | ||
Updated•16 years ago
|
Whiteboard: [es-ita]
| Assignee | ||
Comment 1•16 years ago
|
||
| Assignee | ||
Comment 2•16 years ago
|
||
Had forgotten to include "use Bugzilla::Hook" in the first patch.
Attachment #405407 -
Attachment is obsolete: true
Attachment #405461 -
Flags: review?(dkl)
Attachment #405407 -
Flags: review?(dkl)
| Assignee | ||
Comment 3•16 years ago
|
||
I moved it to check_required_create_fields because that way it will affect Bugzilla::Bug and anything else that uses the three internal subroutines instead of calling SUPER::create.
Attachment #405461 -
Attachment is obsolete: true
Attachment #407913 -
Flags: review?(dkl)
Attachment #405461 -
Flags: review?(dkl)
Comment 4•16 years ago
|
||
Comment on attachment 407913 [details] [diff] [review]
v3
I can see where this would be very useful. I wrote a test extension and this worked pretty much as expected. r=dkl
Attachment #407913 -
Flags: review?(dkl) → review+
Updated•16 years ago
|
Flags: approval?
| Assignee | ||
Updated•16 years ago
|
Flags: approval? → approval+
| Assignee | ||
Comment 5•16 years ago
|
||
Checking in Bugzilla/Hook.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Hook.pm,v <-- Hook.pm
new revision: 1.34; previous revision: 1.33
done
Checking in Bugzilla/Object.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Object.pm,v <-- Object.pm
new revision: 1.38; previous revision: 1.37
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/code/object-before_create.pl,v
done
Checking in extensions/example/code/object-before_create.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/object-before_create.pl,v <-- object-before_create.pl
initial revision: 1.1
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•