Closed Bug 545524 Opened 14 years ago Closed 14 years ago

New Hook: object_validators

Categories

(Bugzilla :: Extensions, enhancement)

3.5.3
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 1 obsolete file)

One thing that extensions often need to do is to update or add validators for objects.
Attached patch v1 (obsolete) — Splinter Review
Here's the hook. This modifies Bugzilla::Object to always cache the result of VALIDATORS per-request, so that the hook doesn't run every time we call set().
Assignee: extensions → mkanat
Status: NEW → ASSIGNED
Attachment #426380 - Flags: review+
Attached patch v2Splinter Review
The first version had the potential to modify the constant's value, which could be a problem in mod_perl.
Attachment #426380 - Attachment is obsolete: true
Attachment #426381 - Flags: review+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/                       
modified Bugzilla/Bug.pm
modified Bugzilla/Hook.pm
modified Bugzilla/Object.pm
modified extensions/Example/Extension.pm
modified extensions/Example/template/en/default/hook/global/user-error-errors.html.tmpl
Committed revision 6981

And fixed a typo after commit:

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/                       
modified Bugzilla/Object.pm
Committed revision 6982.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: approval+
Resolution: --- → FIXED
Is this patch too invasive or risky to take for 3.6.3?
(In reply to comment #4)
> Is this patch too invasive or risky to take for 3.6.3?

  Hey, sorry, I never got back to you on this. Yeah, I think the patch would have been too invasive for any stable branch.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: