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

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

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.

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

will definitely check on tht.

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.

 

 

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

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

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.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,980 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot