Easiest way to export all issues from a project to plain text files?

Greg Hoggarth March 18, 2014

We are moving away from ClearQuest as our main issue tracking system and replacing it with Jira.

One tool we developed in house for dealing with ClearQuest, called BugSearch, is based on Google Desktop Search (now a discontinued product). The way it worked with ClearQuest is that we have a doxygen & php based engine that would extract all of the issues from CQ and store them in a directory as flat plain-text files, and then BugSearch would use Google Desktop Search to look for the provided search terms.

This provided much more relevant search results than the native CQ queries could - as our web developer guy explained it to me, a query simply looks for the occurrence of the query string and produces a result set, whereas a search will look at the number of times the search string occurs and weight the results.

Because we have tens of thousands of issues in ClearQuest, we aren't going to spend the time to migrate them to Jira as we don't see any benefit, but it would be nice if we could update BugSearch so that it could search between CQ issues and new Jira issues in a way that is transparent to the user - because our existing bug database is very valuable in helping us to diagnose new bugs, whether we've seen them before, if it might be a hardware issue etc.

So what is the simplest way to extract issues from a Jira project into some sort of simple plain text file record? Is anyone aware of any plugins that might do what we want, or other existing Jira features that could work? We'd need to export the data at least once a day and it'd need to be automated.

2 answers

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 22, 2014

JIRA Command Line Interface has getIssueList that can produce csv files.

0 votes
Boris Georgiev _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2014

You can try to export in XML and then transform to Plain text using xslt (http://stackoverflow.com/questions/5908668/use-xsl-to-output-plain-text)

You can use script for getting xml each day by executing a request like:

http://yourjiraserver/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=createdDate++%3E+startOfDay%28-1d%29&tempMax=1000

Greg Hoggarth March 19, 2014

Hi Boris,

Can you elaborate further on the script? What we would need is to generate new txt files of all issues that were modified since the last time the script was run, rather than just new issues created since the last run, since it's quite possible for issues to sit around for months before they have work done on them, at which point we'd need to ensure any new content on those old issues was searchable. Would the script you suggest achieve that?

Also using the URL you've provided gives me these errors:

type Status report

message Error in the JQL Query: The character '%' is a reserved JQL character. You must enclose it in a string or use the escape '\u0025' instead. (line 1, character 14)

description The request sent by the client was syntactically incorrect (Error in the JQL Query: The character '%' is a reserved JQL character. You must enclose it in a string or use the escape '\u0025' instead. (line 1, character 14)).

Boris Georgiev _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2014

The problem with the URL is that I've posted it encoded, so you have to pass it in normal form like http://yourjiraserver/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=createdDate>startOfDay(-1d)&tempMax=1000

To find issues that were updated you can use the "updated" JQL keyword like:

updated>startOfDay(-1d)

Suggest an answer

Log in or Sign up to answer