Reputation: 79
We are in a process of migrating trac to jira(defect management tool). I have imported data from Trac to Jira. The changesets that were present in the trac tickets are seen as plain text after importing them to Jira. On verifying the page source, the class name of all such spans is changed as error. Below is part of page source:
<a class="user-hover user-avatar" rel="username1" style="background-image:url(/secure/useravatar?size=small&avatarId=10122);" id="commentauthor_402362_verbose" href="/secure/ViewProfile.jspa?name=username1">username1</a>
added a comment - <span class='commentdate_402362_verbose subText'><span class='date user-tz' title='28/Oct/11 5:53 AM'><time datetime='2011-10-28T05:53+0530'>28/Oct/11 5:53 AM</time></span></span> </div>
<div class="action-body flooded"><p>(In <span class="error">[12345]</span>) refs <a href="/browse/AGLBD-16096" title="GlobalTestSuite tracking">AGLBD-16096</a></p>
Here [12345] is my changeset number. What would be the best way for me to make that changeset number appear as hyperlink instead of text. This should also be working with any ticket that a user opens. All the corresponding changeset numbers should be changed to hyperlinks on every page.
Upvotes: 2
Views: 797
Reputation: 764
This was one of the most valuable things we also needed when importing our trac issue and comment history to JIRA was to preserve the changeset links made via autocommit hooks from subversion commits. We also had multiple repositories enabled in trac which made the link conversion tricky. Unfortunately the JIRA trac import doesn't seem to support any kind of repository changeset link conversion at all, including to Fisheye if you have that imported and enabled already.
Here's the PHP script I ended up writing to patch the sqlite3 trac.db file before import. I've included our user story, some sample SQL commands used for user conversion and our trac.db schema for reference at the bottom of the script for reference. I hope this is useful for others converting from trac to JIRA.
Upvotes: 1
Reputation: 1520
Are this "changeset" equivalent to JIRA's issue key?
If so, the JIRA will change any JIRA issue key to link to issue automatically, if the user that is browsing the issue have right's to display the mention issue.
For example in your jira you have an project TST, with link to browse it:
http://jira.example.com/browse/TST .
Issue 1 would have link:
http://jira.example.com/browse/TST-1
Any occurrence of text "TST-1" in comments, description, JIRA will automatically change to link to issue TST-1 if, and only if user that is reading text TST-1 has enough permission to browse issue TST-1.
You may also need free plugin : application links
Upvotes: 0