Closed Bug 624349 Opened 14 years ago Closed 14 years ago

Modify config_modify_panels Hook to enable adding new parameters

Categories

(Bugzilla :: Administration, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: aliustek, Assigned: LpSolit)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:2.0b8) Gecko/20100101 Firefox/4.0b8
Build Identifier: 

config_modify_panels hook can be used to add new parameters

Reproducible: Always
AFAICT, the problem is that Bugzilla::Config::_load_params(), which is called by checksetup.pl via update_params(), passes $hook_panels to the config_modify_panels hook after @param_list has been populated, making it ignoring newly added parameters. I'm not sure why Config.pm uses both %params and @param_list as shared variables. This module probably needs some cleanup.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86 → All
Attached patch patch, v1Splinter Review
Assignee: administration → LpSolit
Status: NEW → ASSIGNED
Attachment #502555 - Flags: review?(mkanat)
Comment on attachment 502555 [details] [diff] [review]
patch, v1

>Index: Bugzilla/Config.pm
>+        if (!$params{$item}) {
>+            $oldparams{$item} = delete $param->{$item};
>         }

  That needs to be !exists (the param's value could be 0).

  Otherwise this looks fine! You can fix the above on checkin. :-)

  We also should really get rid of "our %params" and use request_cache instead....
Attachment #502555 - Flags: review?(mkanat) → review+
Flags: approval+
Target Milestone: --- → Bugzilla 4.2
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Config.pm
Committed revision 7653.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: relnote
Resolution: --- → FIXED
Considering this blocks bug 284570, I'd like to get this on Bugzilla 4.0. I highly doubt there are any current extensions for 4.0 that will be broken as a result of this change.
Blocks: 284570
Flags: approval4.0?
Bug 284570 will be implemented as an extension, and on trunk only. So you don't need it on this branch, based on this argument.
Yeah, agreed with LpSolit. You are welcome to backport this hook if you feel that doing so would be an appropriate decision.
Flags: approval4.0? → approval4.0-
The hook needs to add parameter description as well
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Oh, that would be a different bug, if it's required. (Template hooks are separate from code hooks.)
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Blocks: 624696
Added to relnotes in bug 713346.
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: