Jira Tips and Tricks

Discovered these while working with Jira

Importing CSV files into Jira

Jira/ViewVC Integration

Apply this patch to viewvc.py. It will make the links in ViewVC link back to Jira when you type your commit messages with the Jira key in brackets. For example:

[EXAMPLE-123] this is my commit message.

'[EXAMPLE-123]' will now be a hyperlink to the Jira issue.

--- /usr/lib/viewvc/viewvc.py.sav       2011-03-14 12:22:57.000000000 -0700
+++ /usr/lib/viewvc/viewvc.py   2011-03-14 15:27:38.000000000 -0700
@@ -986,6 +986,13 @@
   html = cgi.escape(html)
   html = re.sub(_re_rewrite_url, r'\1', html)
   html = re.sub(_re_rewrite_email, r'\1@\2', html)
+
+  # swap in jira links
+  url="http://jira_url_here:8080/browse/"
+  pattern = "\[(" + r"\w+" + "-" + r"\d+" + ")\]"
+  p = re.compile(pattern)
+  html = p.sub('<a href="'+url+r"\1" + '">[' +r"\1" + ']</a>',html)
+
   return html
 
 def format_log(log, cfg, htmlize=1):

Back to Code