Description: Red Hat has added support in Bugzilla to track references to bugs/defects/features in various other external tracking systems. Currently it is just a reference point to the other systems and doesn't actually communicate with them. Bugzilla will automatically linkify the identifier so that the user can click it to go directly to the report in the external tracking system. Function Requirements: enter_bug.cgi, advanced query.cgi, and show_bug.cgi.
LOC Estimation: Bugzilla/Bug.pm: 60 data/params: 1 process_bug.cgi: 45 XMLRPC tests needed: 3 tests (list/get/set) * 20 lines of code avg = 60 Module API tests needed: 3 tests (list/get/set) * 20 lines of code avg: 60 template lines of code: 65 Bugzilla/SanityCheck.pm: 2 Bugzilla/Search.pm: 20 enter_bug.cgi: 10 defparams.pl: 6 Bugzilla/DB/Schema.pm: 20 Total LOC: 350
Created attachment 302927 [details] Patch to add external bug reference functionality (v1) Attaching a patch to add external bug reference functionality to bugzilla 3.2. It is utilizing extension mechanisms to accomplish this. The code is under extensions/external_bugs/{code|lib|template}. Different parts of the code base has hooks added which will call the relevant perl code to perform operations such as create/update/remove external bugs. There is a table that displays on each bug page underneath the attachments table that shows the current bugs and allows adding additional bugs. Note: search functionality is not complete as I am still figureing that one out. Please look at the rest though. Let me know if you have any questions. Dave
Comment on attachment 302927 [details] Patch to add external bug reference functionality (v1) extensions/external_bugs/code/send_change.pl is that supposed to have sentlist and excluded commented out? ExternalBugs.pm - does that call getBugSimple on other bugzilla installations? ANd it's called every time the bug would be viewed/edited? Quite a big patch! Do you have it running on bugdev?
(In reply to comment #3) > (From update of attachment 302927 [details] [edit]) > extensions/external_bugs/code/send_change.pl > is that supposed to have sentlist and excluded commented out? > Yeah, have not fully implemented that yet since we have noone yet to send changes to except for our own Bugzilla and we don't want to do that. We would need to filter those based on where the data was being sent. > ExternalBugs.pm > - does that call getBugSimple on other bugzilla installations? ANd it's > called every time the bug would be viewed/edited? Yes. We could eventually figure out a way to cache the info and then decide on how to know when the cache is stale or out of sync. It only tries it for references marked as is_bz == 1. We do this now on 2.18 and never heard any complaints on slow bug loads. We could start using Bug.get(_bugs) instead for any bugzilla installations that are 3.x or higher. We would need to do a version check first. > Quite a big patch! Do you have it running on bugdev? > Yep.
Created attachment 303205 [details] Patch to add external bug reference functionality (v2) Attaching updated patch that has working search functionality. 1. Requires renaming external_bugs fields in fielddefs table to match actual table.column names. 2. search_functions.pl adds new function defs to front of @funcdefs in Search.pm. 3. Also checking for can_change_field() in update_bug_data.pl. Please review Thanks Dave
Created attachment 303669 [details] Patch to add external bug reference functionality (v3) Revised patch. 1. Fixed typo errors in code/update_bug_data.pl 2. Fixed fielddefs name in LogBugActivity() in lib/ExternalBugs.pm 3. Changed text in template/en/bug/edit-table-data.html.tmpl to be more descriptive. Otherwise same description as previous comments. Please review. Dave
Comment on attachment 303669 [details] Patch to add external bug reference functionality (v3) Hi Dave,, I applied the patch to bugdev and made the changes to fielddefs table in bz-db1 and tested it thoroughly and was working perfectly :). Very nice . Thanks, Noura
Commited to CVS. Worked 16 hours.