New Hook: object_validators

RESOLVED FIXED in Bugzilla 4.0

Status

()

enhancement
RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: mkanat, Assigned: mkanat)

Tracking

3.5.3
Bugzilla 4.0
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

v2
5.78 KB, patch
mkanat
: review+
Details | Diff | Splinter Review
(Assignee)

Description

9 years ago
One thing that extensions often need to do is to update or add validators for objects.
(Assignee)

Comment 1

9 years ago
Posted 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+
(Assignee)

Comment 2

9 years ago
Posted 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+
(Assignee)

Comment 3

9 years ago
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
Last Resolved: 9 years ago
Flags: approval+
Resolution: --- → FIXED

Comment 4

9 years ago
Is this patch too invasive or risky to take for 3.6.3?
(Assignee)

Comment 5

8 years ago
(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.