It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SQL query for JIRA saved filter


I would like to know if there is any way of retrieving the information from my saved filter using a query on a direct connection to mysql db.

If I want to generate the information and result is below 1000 rows, this is the process:

query - > search for issues -> export button -> choose "Excel (current fields)"

The information will automatically be saved on my local folder.

Currently, we have an issue on exporting the information from my save filter if the result set is beyond 1000 rows.

To be more clear, details are as follows:

JQL: project = projectxyz AND issuetype = "Customer Incident" AND created >= -52w

Information I would like to retrieve based on the JQL:

  1. Key (Jira Issue ID)
  2. Issue Type
  3. Summary
  4. Found In
  5. Status
  6. Resolution
  7. Created
  8. Date of First Response
  9. Resolved
  10. Custom Field1
  11. Custom Field2
  12. Severity

Please advise if there is a way to retrieve the same result from my save filter. Otherwise, kindly let me guide me on creating the sql-query to be able to get the data.

By the way. I'm using JIRA 6.1.1

4 answers

1 accepted

0 votes
Answer accepted

Jean Paul,

I agree with Nic that the SQL will not necessarily be straightforward (although I believe that the resolution date actually is available in the jiraissue table).

However, if you want to increase the max limit of 1,000 rows in your export, this may save you from having to use SQL at all:


Hi Scott,

Thank you for the references, we did try to increase the max limit but executing it overloads and affects the performance of JIRA and is not good for a production environment where we have a lot of users.

0 votes

Your JQL is fine, you're limited in the Excel download because it's resource heavy and can overload your server if you use it with a large data set

You should be thinking about why you want thousands of records (a human simply can't process that much data, so you must be looking for summaries or data slices and a far better option that random downloads of already obsolete information is to do the reporting in Jira)

The SQL is complex - Key, issue type, created data, summary, status, and resolution are all on the main table jiraissue, but

to get first response and resolved, you'll need to read the history changeitem and changegroup to establish them, as they're not necessarily stored in the database at all

for custom field 1 and 2you need to read customfieldvalue and customfield

found-in and severity are odd. They are probably custom fields (in which case, see above). Unless you meant "priority" and/or "affects version", in which case, you can read jiraissue for the priority again, but you'll be mucking around with nodeassociation and versions to get affects version

Hi Nic,

Thank you very much for the detailed response. I will map the fields and hopefully everything can be retrieved easily. Currently, I've seen the table jiraissue for the other fields. I will check the history change item and change group for the other custom fields.

One thing, before 6.1, pkey is being ised for JIRA issue ID. Any advise on how it can be extracted for JIRA 6.1 and above?


select p.pkey || '-' || ji.issuenum as issuekey,summary from jiraissue ji left join project p on limit 15;

You may need to use a different string concatenation operator/function, depending on your specific SQL dialect.

Thanks scott.

0 votes

Hi everyone,


You can view the saved filter in Jira, follow these steps:-

Choose the Jira icon ( or ) > Issues and filters. Choose any filter from the list on the left: System filters appear at the top of the list, including: My open issues, Reported by me, All issues, Open issues, Done issues, Viewed recently, Created recently, Resolved recently, and Updated recently.


Recently I heard this IAs coaching delhi from many people. Is it really true.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

838 views 5 22
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you