Bug 627570 - Enable Bugzilla to make Jira issue ids clickable links
Enable Bugzilla to make Jira issue ids clickable links
Status: CLOSED CURRENTRELEASE
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
3.6
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: Simon Green
Jiri Pechanec
: Reopened
Depends On:
Blocks: JIRABZ 694054 708496 711884
  Show dependency treegraph
 
Reported: 2010-08-26 08:53 EDT by Jiri Pechanec
Modified: 2014-10-12 18:46 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-04 07:09:48 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)

  None (edit)
Description Jiri Pechanec 2010-08-26 08:53:22 EDT
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 08:13:26 EST
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 06:00:53 EST
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 08:27:05 EST
This is now on the staging server.
Comment 6 Len DiMaggio 2011-03-09 13:10:03 EST
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 09:17:57 EST
Closing - this has been implemented - see the reference to BRMS-557 here:

https://bz-web2-test.devel.redhat.com/show_bug.cgi?id=688681
Comment 9 Simon Green 2011-06-09 06:15:05 EDT
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 16:23:00 EDT
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 03:29:24 EDT
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 06:29:47 EDT
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 07:22:37 EDT
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


Thx!
Comment 16 Len DiMaggio 2011-06-21 07:32:06 EDT
Wiat - just got it - the prefixes in text - OK.
Comment 17 Len DiMaggio 2011-06-21 07:38:14 EDT
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
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 08:00:24 EDT
(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 09:04:49 EDT
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 19:10:37 EDT
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 07:14:56 EDT
Could we support one more syntax definition #SOA-3091?

Otherwise I confirm that it is working correctly
Comment 22 Simon Green 2011-06-22 07:45:22 EDT
(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

:-)

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