Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access the underlying sql query of a JIRA report

Suvarna
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 30, 2020

Hi,

I'd like to view the underlying sql with all the table joins for a Test Execution (List) report I've created in the Test tab of JIRA.  (My company has TM4J as an add-on)

3 answers

0 votes
Nic Brough -Adaptavist-
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.
October 3, 2020

Ok, but you have made an incorrect assumption here.  You are assuming that SQL is run to get the underlying data for a report.  It is not.  Reports do not run any SQL generally, they get their data from the index, which is not SQL based.

You will need to write your own report as an app.

0 votes
Suvarna
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 1, 2020

Hi Nic, 

Thanks for your prompt reply.  The reason I asked this question was that my organization is using JIRA specifically TM4J to track all testing activities.  We are required to report on certain KPIs that are rolled up at project levels.  I did this using the widget "Test Execution Results (List)".  The data available in this report however is not complete.  I was trying to build a query that would output similar data.  However I was unable to extract the relationships in the tables accurately.

My thought behind the request to see the SQL was to use it to extract the joins so I could then customize the query for only the fields I need.  

Hope this information will provide better clarity.

Suvarna

0 votes
Nic Brough -Adaptavist-
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 30, 2020

Why?

Jira's database is not intended for anything other than being a data store.  The SQL you are asking for is a lot more complex than you think it will be and probably won't fully answer whatever your question is.

Could you tell us what you are trying to achieve, rather than pick on a specific method of getting raw data?

Suggest an answer

Log in or Sign up to answer