Bug 406161 - 3.6: External Bug Tracker references
3.6: External Bug Tracker references
Status: CLOSED NEXTRELEASE
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
3.2
All Linux
high Severity medium (vote)
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks: RHBZ30UpgradeTracker 427057 1082943
  Show dependency treegraph
 
Reported: 2007-11-30 11:58 EST by David Lawrence
Modified: 2014-04-28 00:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-27 23:32:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to add external bug reference functionality (v1) (48.33 KB, patch)
2008-04-18 15:32 EDT, David Lawrence
no flags Details | Diff
Patch to add external bug reference functionality (v2) (47.63 KB, patch)
2008-04-21 17:07 EDT, David Lawrence
no flags Details | Diff
Patch to add external bug reference functionality (v3) (47.65 KB, patch)
2008-04-24 14:21 EDT, David Lawrence
dkl: review? (kbaker)
nelhawar: review+
Details | Diff

  None (edit)
Description David Lawrence 2007-11-30 11:58:04 EST
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.
Comment 1 David Lawrence 2007-12-19 23:55:34 EST
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
Comment 2 David Lawrence 2008-04-18 15:32:28 EDT
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 3 Kevin Baker 2008-04-18 16:52:50 EDT
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?
Comment 4 David Lawrence 2008-04-18 17:10:46 EDT
(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.
Comment 5 David Lawrence 2008-04-21 17:07:59 EDT
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
Comment 6 David Lawrence 2008-04-24 14:21:30 EDT
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 7 Noura El hawary 2008-05-08 22:32:07 EDT
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
Comment 8 David Lawrence 2008-05-09 10:32:48 EDT
Commited to CVS.

Worked 16 hours.

Note You need to log in before you can comment on or make changes to this bug.