Bug 627570

Summary: Enable Bugzilla to make Jira issue ids clickable links
Product: [Community] Bugzilla Reporter: Jiri Pechanec <jpechane>
Component: Bugzilla GeneralAssignee: Simon Green <sgreen>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Pechanec <jpechane>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.6CC: ebaak, jwulf, ldimaggi, mharvey, sgreen
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: All   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-04 11:09:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 583097, 694054, 708496, 711884    

Description Jiri Pechanec 2010-08-26 12:53:22 UTC
Please configure Bugzilla to recognize Jira issue format so when Jira id is type then it is automatically converted to clickable link, e.g.
SOA-1308 translates to
<a href='https://jira.jboss.org/browse/SOA-1308'>SOA-1308</a>

Comment 2 Simon Green 2011-02-08 13:13:26 UTC
This fix seems to work on bz-web2-test.d.r.c, but not on bz-devel.e.b.r.c. I'll have to find out why it doesn't seem to work on my test machine. Very annoying.

$ svn commit bugzilla.spec.in extensions/RedHat/Extension.pm
Sending        bugzilla.spec.in
Sending        extensions/RedHat/Extension.pm
Transmitting file data ..
Committed revision 2359.

Comment 3 Simon Green 2011-02-09 11:00:53 UTC
Seems that I had apache misconfigured on my test machine (bz-devel.e.b.r.c). The change is now working there.

Comment 4 Simon Green 2011-02-09 13:27:05 UTC
This is now on the staging server.

Comment 6 Len DiMaggio 2011-03-09 18:10:03 UTC
Clean-up task from the March 9 2011 Bugzilla / BRMS Pilot Meeting

This bugzilla has been marked as ON_QA - we need to verify that the changes made to https://bz-web2-test.devel.redhat.com/ are acceptable and that this bugzilla can be closed. Please verify the change and close (or re-open) this bugzilla by March 15 2011. Thx!

Comment 7 Len DiMaggio 2011-03-10 14:17:57 UTC
Closing - this has been implemented - see the reference to BRMS-557 here:


Comment 9 Simon Green 2011-06-09 10:15:05 UTC
We're reopening this one to make a few changes. Unfortunately we are linking to many non Jira issues with the change we made. For examples, see bug 711884 'UTF-8' and bug 708496 'RHEL-6'

The bugzilla team discussed maintaining an inclusion or exclusion list based on the product codes, but determined this was not the best method.

Therefore all jira issues will need to be prefixed by the word 'jira' or 'jira issue' to turn into a link. This is no different from bugzilla bug numbers needed to be prefixed by the word bug.

  -- simon

Comment 12 Simon Green 2011-06-20 20:23:00 UTC
This change was made Friday morning (AEST), and has been pushed live. However, please test this on bz-web2-test.devel.redhat.com to make sure it works as expected. See comment 9 for details of how it will now work.

Marking as ON_QA as it requires testing, even though the change has been put live.

  -- simon

Comment 13 Jiri Pechanec 2011-06-21 07:29:24 UTC
The issue as implemented works but I'd expect to apply the to link change for all imported JIRA issues, for example for imported SOA-1956

Comment 14 Simon Green 2011-06-21 10:29:47 UTC
I'm changing this back to ON_QA as the issue works as implemented.

The bugzilla team had a discussion regarding this earlier in the month. We decided that maintaining an inclusion or exclusion list of Jira products was not the way to go, so therefore issue would need to be prefixed with 'jira' or 'jira issue' to be a clickable link.

This is the same way that a bugzilla bug must be prefixed by the word bug to be clickable.

  -- simon

Comment 15 Len DiMaggio 2011-06-21 11:22:37 UTC
Hey Simon - at first glance it looks good. Questions:

* The bugs imported from JIRA to bz-web2-test.devel.redhat.com have the JIRA information in 2 places:

   - The 'URL' field - These point to the external JIRA

   - The external/JBoss Issue Tracker - These point to: issues-stg.jboss.org

(Where can I get an account to issues-stg.jboss.org?)

* I'm not seeing the prefixes that you are referring to - for example, in: https://bz-web2-test.devel.redhat.com/show_bug.cgi?id=730879


Comment 16 Len DiMaggio 2011-06-21 11:32:06 UTC
Wiat - just got it - the prefixes in text - OK.

Comment 17 Len DiMaggio 2011-06-21 11:38:14 UTC
These work as you describe earlier in this bz:

jira issue SOA-3091      (good)
jira issue Soa-3091
jira #SOA-3091           (good)
jira something SOA-3091
jira issue SOA-3091      (good)

As is also mentioned earlier - we'll need to document this for the users.

Question - these links^ point to the real (issues.jboss.org) and not the staging JIRA server.

Comment 18 Simon Green 2011-06-21 12:00:24 UTC
(In reply to comment #17)
> Question - these links^ point to the real (issues.jboss.org) and not the
> staging JIRA server.

That is correct. Links in comments will always point to the live server. The only links to the staging server are in the external bugs section (so that the bug 619547 can be tested)

  -- simon

Comment 19 Len DiMaggio 2011-06-21 13:04:49 UTC
I think what Jirka is getting at is:

In other words, the import should include a parsing/scanning of the JIRAs, so that the resulting bugzillas contain links to all JIRAs that were referenced in the imported JIRA.

So, it is a 2-part fix:

1) The ability to add new links

2) The automatic parsing of all text in a JIRA during its import to Bugzilla - and the creation of JIRA links for all JIRAs referenced in comments, links, etc.

Comment 20 Simon Green 2011-06-21 23:10:37 UTC
The first point is done (to the new specification)

The second one is fraught with danger, and I am voting against it. There are two main issues I see:

1) The potential to create invalid links. The initial reason for the change was because there were too many false links (eg. RHEL-6 and UTF-8). The logic would also be a little complication as there would be JIRA looking links that we don't want to create a link to. For example, we wouldn't want to create a link that was part of a URL.

2) We would either need to make the comment a URL (which bugzilla auto links) or appending the word jira before the issue number. Adding either of these may make the comment less easy to read. Two examples:
 a) "Jira issues SOA-1 and SOA-2 need to be addressed" would become "Jira issues jira SOA-1 and jira SOA-2 need to be addressed".
 b) "Hello. SOA-1 is a bug" would become "Hello. jira SOA-1 is a bug" (we wouldn't be able to handle correct capitalisation)

Leaving ON_QA.

  -- simon

Comment 21 Jiri Pechanec 2011-06-22 11:14:56 UTC
Could we support one more syntax definition #SOA-3091?

Otherwise I confirm that it is working correctly

Comment 22 Simon Green 2011-06-22 11:45:22 UTC
(In reply to comment #21)
> Could we support one more syntax definition #SOA-3091?

Jira #SOA-309 will work but #SOA-309 by itself won't. Allowing a bare #SOA-309 would lead to too many false positives.

> Otherwise I confirm that it is working correctly