SQL Query to get issue id of all the issues with issue type as Defect, status as closed of a particular project and for a particular version in Jira 6.1
I'd do that in JQL in Jira, not SQL. It's easier to construct, faster, respects security, and you can save it as a filter which is dynamic, exportable, shareable and can be used as the basis for reports.
issuetype = Defect and status = closed and project = <xyz> and version = <123>
In SQL, you'll need to join issue to issuetype, nodeassociation, project and status to begin with...
I have a query that'd do that in Jira 5.0.7 and the query goes -> "SELECT vname FROM projectversion, nodeassociation, jiraissue WHERE ASSOCIATION_TYPE = 'IssueFixVersion' AND SINK_NODE_ID = projectversion.id AND SOURCE_NODE_ID = jiraissue.id AND pkey like '"+pkey+"'"
Since, in Jira 6.1, pkey column in table jiraissue has been removed and a new column has been added "issuenum", I am facing this problem in my java code.
Two things spring to mind:
1. You should NOT be embedding SQL in Java code. Why are you not simply using a proper internal JQL call which will be faster, safer and would have continued to work fine after your upgrade?
pkey exists, but it has null values for all the entries in the table.
Also the code has already been written and since we are planning to migrate to Jira 6.1 we are facing this problem. This is a small application which has been added to a plugin(created by my team) to fetch issue details and populate the values in an excel sheet. I just need an sql query with some modification that will give the issueid(ex:- JST-1041) of the issues with a particular fixed version value of a project.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
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!
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