I have issue types named Test Cases. In those types I have a custom field named ‘Story’ which holds the keys for the related stories of a test case.
Now, using JQL, I would like to search for all test cases that are related to Stories that are in openSprints() (‘Sprint in openSprints()’).
Any idea how I can achieve it (I have script runner installed as well).
In general, is there any JQL extension plugin that offers an ability to cascade JQL searches based on returned fields?
If it is for reporting purposes, then it should be trivial by using SQL for JIRA..
select * from ISSUES i inner join ISSUECUSTOMFIELDS cf on cf.STORY=i.KEY where i.JQL='Sprint in openSprints()'
how does the query above work?
just what you are looking for
Oops again, if you want to see them as JQL then it is a bit more complex as the SQL query must return the key of the issue. Therefore the right JQL query would be: ============= issue in sql(" select i2.key from ISSUES i1 inner join ISSUECUSTOMFIELDS cf on cf.STORY=i1.KEY inner join ISSUES i2 on i2.id=cf.issueid where i1.JQL='Sprint in openSprints()' ") note please that a second ISSUE table has to be joined to the ISSUECUSTOMFILEDS in order to get the issue KEY from the ID.
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...
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