Closed
Bug 743589
Opened 12 years ago
Closed 12 years ago
Remove as much code from patch-4.0 as possible, and put all changes in the Testopia extension instead
Categories
(Testopia :: General, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
2.5
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(3 files)
6.02 KB,
patch
|
Details | Diff | Splinter Review | |
1.13 KB,
patch
|
Details | Diff | Splinter Review | |
10.00 KB,
patch
|
Details | Diff | Splinter Review |
Currently, you need to apply patch-4.0 to have a working Testopia installation. I think that Bugzilla 4.2 has enough hooks at most key places to not require them anymore. This patch should go away and all changes implemented in the extension itself.
Assignee | ||
Comment 1•12 years ago
|
||
I didn't kill patch-4.0 entirely, because there are some heavy hacks in it, especially in User.pm. But I could kill half of the file, which is a nice improvement. Someone feel free to test this patch.
Assignee | ||
Comment 2•12 years ago
|
||
Changes in Bugzilla/Error.pm could go into the extension thanks to a new hook, but I doubt we can do anything about the remaining code, at least not easily.
Summary: Remove patch-4.0, and put all changes in the Testopia extension instead → Remove as much code from patch-4.0 as possible, and put all changes in the Testopia extension instead
Do you guys think it is good idea to get all tr_*.cgi files from Bugzilla root to Testopia/Extension.p and use page.cgi to do all the work. This would be great to contain all Testopia code in the extension but a lot of work as there are too many tr_*.cgi files and it means a huge Extension.pm What are your thoughts?
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to rojanu from comment #3) > Do you guys think it is good idea to get all tr_*.cgi files from Bugzilla > root to Testopia/Extension.pm and use page.cgi to do all the work. I thought exactly the same thing. There would be two major advantages by doing so. First of all, all the code would be contained in extensions/Testopia/, and secondly, you wouldn't have conflicts anymore when using bzr. Currently, from the bugzilla/ root directory, you cannot use bzr to upgrade both the Bugzilla code and the Testopia code, because you cannot have two .bzr directories at the same place.
Assignee | ||
Comment 5•12 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/extensions/testopia/trunk/ modified extensions/Testopia/Extension.pm modified extensions/Testopia/patch-4.0 modified extensions/Testopia/lib/Constants.pm added extensions/Testopia/template/en/default/hook/global/setting-descs-settings.none.tmpl Committed revision 650.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•12 years ago
|
Attachment #613204 -
Flags: review?
Assignee | ||
Comment 6•12 years ago
|
||
I realized that the error mode 4 is already used by ERROR_MODE_TEST, and so ERROR_MODE_AJAX must use another ID. I changed it to 5. This patch also fixes a problem where ERROR_MODE_AJAX is not accessible from Bugzilla/Error.pm due to the previous patch. Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/extensions/testopia/trunk/ modified extensions/Testopia/patch-4.0 modified extensions/Testopia/lib/Constants.pm Committed revision 653.
Assignee | ||
Comment 7•12 years ago
|
||
Actually, there is a way to remove all the remaining code from patch-4.0. We can redefine existing user methods if we write in Extension.pm: BEGIN { undef &Bugzilla::User::get_selectable_products; undef &Bugzilla::User::derive_regexp_groups; *Bugzilla::User::get_selectable_products = \&get_selectable_products; *Bugzilla::User::derive_regexp_groups =\&derive_regexp_groups; } sub get_selectable_products { # custom code here... } sub derive_regexp_groups { # custom code here... } @ghendricks: is that something you want to happen, or do you prefer to patch the Bugzilla source code?
Assignee | ||
Comment 8•12 years ago
|
||
ghendricks told me by email that he was fine with the idea to redefine the methods from the extension. Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/extensions/testopia/trunk/ modified extensions/Testopia/Extension.pm modified extensions/Testopia/patch-4.0 Committed revision 659.
You need to log in
before you can comment on or make changes to this bug.
Description
•