You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Is there any possibility to find all stories with defects that are, resolved and ready to deploy bugs using JQL in Jira? For example, I got Story ABC with two bugs (B1, B2) linked as Defects. One of these bugs (let's say B1) it's done and ready to deploy, but another one (B2) is still in status To Do. I prepared this JQL, but it doesn't work as I expected :/
project = "ABC" AND (issue in requirementsWithDefects("", "Resolved")) AND fixVersion = xxx and issuetype = "Story" AND status in ("To Deploy") OR issuetype in (Bug) and project = "ABC" and fixVersion = xxx AND status in ("To Deploy")
It still lists bug B1, which is associated with a particular story ABC. I don't want to filter these types of bugs. These two bugs should be listed only when the parent story is ready to deploy. Is there a way to do that?
The function "requirementsWithDefects" seem to originate from a testing App - but according to your saying it could work like this, assuming I understood you correctly.
type = story AND status = Resolved AND issueFunction in linkedIssuesOf("type=bug AND resolution is NOT EMPTY")
Will get you stories which are in status resolved and have at least one linked issue of type "Bug" which is resolved - of course, you would need adjust this to match your namings (Issue Types and such).
Does this come close to what you are after?
Although we do not know your hosting type, a disclaimer: this applies to Server and the usage of Script Runner.
Hi Daniel ,
When I try this query I am getting an error as mentioned below. can u pls help here.
Query - project = CA AND type = story AND issueFunction in linkedIssuesOf("type=bug AND resolution is NOT EMPTY") order by created DESC
error - Your JQL includes the [linkedIssuesOf] function from the [Adaptavist Scriptrunner] app for Jira Server. This function works differently in Jira Cloud. Refer to https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions for details or contact the app provider
Filters that I am trying to create are - Filter1 - Find the user stories with open bugs , filter 2 - Find the user stories with resolved bugs
The message suggests you need to use "Enhanced Search" in that case - this is special to Jira Cloud:
Going there is should be perfectly possible to write the JQL queries you are interested in.
At first glance you may want to add some brackets to group related clauses together. The order of operations with long queries with a mixture of AND and OR is not always intuitive.
You have the clause "project = "ABC"" twice but is not easy to see the purpose of this without spending time breaking down the query.