Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Filter to find issues with links to other issues which are unresolved

Kevin Bushell
Contributor
February 16, 2017

I'm trying to use JQL, and Script Runner functions, to construct filters which give me a list of issues (typically stories) in a project which have a link (or links) to other issues where the linked issues are unresolved.

It's the last bit I'm struggling with. I can get the list of stories which have links easily enough with:

project = KBP AND issuetype = Story AND issueFunction in hasLinks("is blocked by")

but this shows me all stories which have that link relationship irrespective of whether or not the linked issue has been resolved.

And, of course, adding

AND resolution = Unresolved

simply selects the unresolved issues in the returned filter, rather than the issues with unresolved *linked* issues.

Any advice?

1 answer

1 accepted

6 votes
Answer accepted
Thomas Schlegel
Community Champion
February 16, 2017

Hi Kevin,

this should do it:

project = KBP and issuetype = Story AND issueFunction in linkedIssuesOf("resolution = unresolved", "blocks")

Thomas

Kevin Bushell
Contributor
February 16, 2017

Thomas, thanks. Your query wasn't quite right but gave me enough to find the solution.

The link relationship I needed was "blocks", because in my project the linked issues block completion of the stories (rather than the other way around). Thus:

project = KBP and issuetype = Story AND issueFunction in linkedIssuesOf("resolution = unresolved", "blocks")

to find the stories which have linked issues which are unresolved. smile

Of course, I can now also create a filter which finds the stories which are no longer blocked by linked issues:

project = KBP and issuetype = Story AND issueFunction in linkedIssuesOf("resolution != unresolved", "blocks")

Thanks for the help.

Thomas Schlegel
Community Champion
February 16, 2017

you're welcome smile

Kevin Bushell
Contributor
February 17, 2017

Slight issue with the second filter:

project = KBP and issuetype = Story AND issueFunction in linkedIssuesOf("resolution != unresolved", "blocks")

If there is more than one linked issue which is blocking and not all are resolved, then story is included in the filter results. That's not the behaviour I expected, or want.

I want it to only return stories for which ALL linked blocking issues have been resolved. Any ideas?

Kevin Bushell
Contributor
February 21, 2017

Okay, I resolved my problem by adding a clause to make this tortuous query...

project = KBP AND issuetype = Story AND resolution = Unresolved AND (issueFunction in linkedIssuesOf("resolution != unresolved", blocks) ) AND NOT (issueFunction in linkedIssuesOf("resolution = unresolved", blocks) )
Like • 3 people like this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events