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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unless something has changed, it looks like you need a plugin for this: https://community.atlassian.com/t5/Jira-questions/jira-query-issues-with-linked-issues/qaq-p/426769
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.