How to get the 20k+ issues exported into xls or csv ?

Shamith Shankar September 16, 2015

Hi,

I need to export some 20k+ issues into xls or csv .

i tried groovy script of script plugin, it goes into timeout aftr 4k issues, then i tried putting java code itself  into JIRA, i was able to get around 8k and then timeout.  

Is it related to 'jira.index.lock.waittime' or is there anything else which i am missing.

4 answers

2 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.
September 16, 2015

getIssueList from JIRA Command Line Interface (CLI) produces a CSV file based on your JQL query. It is not limited as it uses a paged interface.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 16, 2015

I really should have said that - the paging in the CLI handles the "split it up into small chunks" for you.

Shamith Shankar September 19, 2015

will definitely check on tht.

1 vote
Pablo Beltran
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.
September 16, 2015

SQL for JIRA can do the job. You can use just the same JQL query embedded in SQL to filter the issues. It also supports exporting to CSV on the JIRA Server.

 

 

Pablo Beltran
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.
September 17, 2015

You should perform a batch call similar to: call CSVWRITE ( 'C:/MyFolder/MyCSV.txt', 'select * from ISSUES where <your filter>' ); logged in as administrator in the built-in web database console.

0 votes
Midori
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.
September 24, 2015

Better Excel Plugin exposes an easy to use Excel API to render real Excel files from JIRA issues:

public interface XlsApi {
	/**
	 * This is a convenience method to render Excel spreadsheets from single issues.
	 * @see #getXls(String, String, List, Map) For parameters, see the API call that supports multiple issues.
	 */
	RenderingResult getXls(String templateName, String title, Issue issue, Map additionalModel);

	/**
	 * Renders Excel spreadsheets from the passed issues using the specified template.
	 * @param templateName identifies the template to use. Example: issue-navigator.xlsx
	 * @param title the title for the resulted Excel spreadsheet.
	 * @param issues the issues to be exported in the Excel spreadsheet.
	 * @param additionalModel additional model objects that are passed to the Excel spreadsheet renderer. They can be used in the template code as regular Velocity variables. (This is purely optional and may be just an empty map.)
	 * @return the result object containing the Excel spreadsheet filename and its actual bytes.
	 */
	RenderingResult getXls(String templateName, String title, List issues, Map additionalModel);
}

It does not limit the size of the issues argument, so you can pass in any number. Just write some Groovy scripts based on this tutorial, and experiment.

Beware though that if you use a complicated Excel template, it may be resource intensive to render the result.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 16, 2015

JIRA imposes a limit of 1,000 issues by default for a good reason - the process chews up resources for each issue and it quite simply overloads your system if you try to do too many.

There are ways to increase the limit, but you are always going to run out of resources at some point.

Your only options are

  1. Examine why you are exporting and work out a better way to achieve the goal
  2. Split up the exports into small chunks (say 2,000 at a time, to avoid thrashing the server for the users)
  3. Use the XML export instead and analyse that instead of csv

Suggest an answer

Log in or Sign up to answer