JIRA Transition History Data Report

AKASH BHARDWAJ August 31, 2016

Hi All,

I am trying to fetch data report for each Issue transition present under 1 project. Currently I cannot find any such Report present in JIRA, I am trying query database for same but still i am not able to get project specific details.

I am getting reports/data for whole JIRA instance with all issues. But i would like to have report/queried upon single project and for all issues present under that project.

Please find my query below:-

SELECT changeitem.oldstring, changeitem.newstring, changegroup.author, changegroup.issueid,
changegroup.created FROM changeitem 
JOIN changegroup 
ON changeitem.groupid=changegroup.id 
WHERE changeitem.field='status'

 

Thanks,
Akash 

1 answer

1 accepted

1 vote
Answer accepted
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.
August 31, 2016

The database is very much NOT built for reporting and you would be far better off using the API.  A REST call to JIRA with "project = X" would get a list of issues and you could easily poke that for the history.  Or write an add-on that can use the API to pull it.

Otherwise, in the database, you're going to need to read the project table to get the project key, then use that to read jiraissue for each issue, then for each of those, read changegroup for changes to those issues and finally changeitem.

Or, inversely, read everything from changeitem and changegroup as you have already, and join that to jiraissue to work out the issues and then project to work out the project.

Either way, you've got large, inefficient SQL queries that are a really bad way to do this.

AKASH BHARDWAJ August 31, 2016

Thank you @Nic Brough [Adaptavist] :- I was using Confluence though by SQL plugin, I already had Data Source added so thought of using this. once query has been embeded under page using plugin would have served my purpose.

I agree using REST would be good, but not in my team all are technical and would not be happy with REST though.

 

Thanks for answer much appreciated !!

 

Thanks,
Akash 

AKASH BHARDWAJ September 7, 2016

Hi,

I am less knowledgeable on REST would be helpful.

 

Thanks,
Akash 

Suggest an answer

Log in or Sign up to answer