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


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 Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,656 views 18 21
Read article

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