Issue Details (XML | Word | Printable)

Key: JRA-3779
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jeff Turner [Atlassian]
Reporter: Kenny MacLeod
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
JIRA

Convert bugzilla text links to JIRA links during import

Created: 18/May/04 06:53 AM   Updated: 24/May/06 12:22 AM
Component/s: Import / Export
Affects Version/s: 2.6.1 Pro, 2.6.1 Enterprise
Fix Version/s: 3.5

Time Tracking:
Original Estimate: 4 hours
Original Estimate - 4 hours
Remaining Estimate: 4 hours
Remaining Estimate - 4 hours
Time Spent: Not Specified
Remaining Estimate - 4 hours

File Attachments: 1. Java Archive File bugzilla_translatelinks.jar (27 kB)

Issue Links:
Reference
 

Participants: Anton Mazkovoi [Atlassian], Denis Yurkin, Jeff Turner [Atlassian], Keith Brophy, Kenny MacLeod, Mark Chaimungkalanont [Atlassian], Mikhail Sobolev, Peter Mularien and Sam Mesh
Since last comment: 2 years, 39 weeks, 1 day ago
Resolution Date: 11/Jan/06 11:11 PM
Labels:


 Description  « Hide
Currently, the bugzilla import process allocates new issue IDs for each bug. The original bugzilla ID seems to be buried in some kind of custom field in the imported issue.

It would be great to have the option to use bugzilla's ID instead, e.g. Bug 123 would be imported as issue XYZ-123.

This would make it much easier to move users across to JIRA, since our users make heavy use of bug IDs.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jeff Turner [Atlassian] added a comment - 20/May/04 07:10 PM
Hi,

Would the inclusion of a Bugzilla portlet (see JRA-3777) meet your needs? It allows JIRA issues to be searched for by their old Bugzilla ID.


Kenny MacLeod added a comment - 21/May/04 04:04 AM
Yes, the Bugzilla portlet would likely be sufficient to cover this.

Denis Yurkin added a comment - 24/May/04 07:58 AM
> Would the inclusion of a Bugzilla portlet (see JRA-3777) meet your needs?

As far as I understand, it leaves links like "bug#101, comment#1" from Bugzilla descriptions/comments broken – let me know if I'm wrong.


Jeff Turner [Atlassian] added a comment - 24/May/04 07:22 PM
Denis,

We'll be happy to convert that sort of inline link (as the Mantis importer does). Do you know if bug#xxxx is the convention?


Denis Yurkin added a comment - 25/May/04 01:55 AM
Jeff,

Please refer to this links (section Autolinkification):
http://www.bugzilla.org/docs216/html/hintsandtips.html
http://www.bugzilla.org/docs/html/hintsandtips.html

I could not find more formal docs – perhaps it's best to refer to Zilla sources.

For me, both "bug 12345" and "bug#12345" work.


Jeff Turner [Atlassian] added a comment - 25/May/04 06:11 PM
Denis,

Thanks a lot - that's just what I was after.


Peter Mularien added a comment - 18/Aug/04 07:06 AM
Agreed, the auto-linkification would be a great feature to be able to do in Bugzilla imports. Voting for this issue as a proxy for auto-linking

Jeff Turner [Atlassian] added a comment - 29/Nov/04 02:00 AM
Giving the issue a more correct subject.

Mikhail Sobolev added a comment - 01/Nov/05 01:12 AM
Is there any progress on this issue? I'm evaluating Jira now and importing our existing Bugzilla database is a must. Without those inline links the import is not going to be that useful for us.

Jeff Turner [Atlassian] added a comment - 03/Nov/05 05:32 AM
Mikhail, others,

I've had a go at implementing this. If you'd like to try it, please download the attached .jar and run 'jar xvf path/to/bugzilla_translatelinks.jar' in the WEB-INF/classes/ directory (this will replace the existing .class files). It requires JIRA 3.4-beta1.

Cheers,
Jeff


ATLASSIAN - http://www.atlassian.com
Australia's Fastest Growing Software Company 2002-05 [BRW Magazine]


Sam Mesh added a comment - 06/Dec/05 07:23 PM
Has anybody got bugzilla's autolinkofication regexp/source?

BTW, you can test bugzilla's autolinkofication algorithm at https://bugzilla.mozilla.org/page.cgi?id=linkify.html


Anton Mazkovoi [Atlassian] added a comment - 07/Dec/05 06:59 PM
Sorry if I am stating the obvious, but bugzilla is open source software, so it should be possible to dig through its code and find the right piece.

Sam Mesh added a comment - 08/Dec/05 07:43 PM

bugzilla is open source software, so it should be possible to dig through its code and find the right piece

Has this statement passed "Triple Filter Test"? (just kidding)

I've found the following:

  • Simple regexp in the attached bugzilla_translatelinks.jar
    "[bB]ug #?(\\d+)"
  • Quite complicated algorithm in autolinkification [patch|"https://bugzilla.mozilla.org/show_bug.cgi?id=213440] from bugzilla's bugzilla. This made it obvious that bugzilla's autolinkification algorithm is more than just one regexp.

Keith Brophy added a comment - 11/Dec/05 06:08 PM
Hi Sam,

Thanks for this pointer - I have reopened this issue and we shall look at improving the regexp to better match the bugzilla regexp.

Thanks,
Keith


Mark Chaimungkalanont [Atlassian] added a comment - 14/Dec/05 01:13 AM
For implementing this, we should look at reusing the logic used for FogBugz importer. That importer correctly handles rewriting issue keys from "bug 1, 2, 3" to "issues KEY-1, KEY-2, Key-3", which I believe is also what's required here

Sam Mesh added a comment - 21/Dec/05 12:03 PM
Also, "bug 1 comment 2".

Jeff Turner [Atlassian] added a comment - 11/Jan/06 11:11 PM
There is only one bug-matching regexp in Bugzilla, and it is almost identical to the one JIRA uses:
my $bug_re = qr/bug\s*\#?\s*(\d+)/i;

As for converting 'bug 1, comment 2' to a link, I don't think it's going to be feasible. JIRA has no built-in behaviour for linking to comments, so the importer would have to emulate it with an absolute URL to the issue + comment permalink. Eg. the text "please see bug 1, comment 2" would become "please see http://jira.atlassian.com/browse/JRA-3779#action_1234". This is both ugly and brittle (absolute URLs tend to break). By contrast, with what's implemented in 3.5 you'd get "please see JRA-123, comment 2" which seems quite acceptable.