Bug 406161 - 3.6: External Bug Tracker references
Summary: 3.6: External Bug Tracker references
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 3.2
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: RHBZ30UpgradeTracker 427057 1082943
TreeView+ depends on / blocked
 
Reported: 2007-11-30 16:58 UTC by David Lawrence
Modified: 2014-04-28 04:40 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-28 03:32:21 UTC
Embargoed:


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

Description David Lawrence 2007-11-30 16:58:04 UTC
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-20 04:55:34 UTC
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 19:32:28 UTC
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 20:52:50 UTC
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 21:10:46 UTC
(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 21:07:59 UTC
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 18:21:30 UTC
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-09 02:32:07 UTC
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 14:32:48 UTC
Commited to CVS.

Worked 16 hours.


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