Need help with JQL query subtasks and linked issues

I have a parent issue with subtasks attached. The subtasks have linked issues that are at the parent level (bugs)

I am trying to write JQL to find the parent issue where all its subtask are closed and all the subtasks linked issue are closed. I am able to get the part where all the subtasks are closed, it is the link part that I am having issues with.

This is what I am using for the first part -

project = "PJM Maintenance" AND issuefunction in parentsOf("issuefunction in subtasksOf(\"issuefunction not in parentsOf('type in subTaskIssueTypes() and status != closed') and status != closed and type in standardIssueTypes()\") and status = closed")

I have script runner installed.

Thank you!

3 answers

1 accepted

1 vote

Jennifer: If you tag your question with script runner tag I am much more likely to respond.

Justin: Script Runner has all the jql functionality that that plugin has, and is free.

If you start by getting the second part right and saving it as a filter. Then use "in parentsOf("filter = 12345") ", that should work.

It's hard to nest several levels as you can't escape quotes in the jql search.

2 votes
Justin Burke Atlassian Team Jul 24, 2014

Hi Jenifer - I have seen other Atlassian customers do what you are looking to do using the Search Linked Issues Plugin. This plugin provides some JQL functions like subtaskIssuesFromFilter() and subtaskIssuesFromQuery() that I think may be worth looking into.

Hi Jenifer, there is free add-on: https://marketplace.atlassian.com/plugins/ru.andreymarkelov.atlas.plugins.utils

With functions:

  • Issues subtasks JQL Function. This is JQL function "issuesSubtasks(?)" which returns list of issues that are subtasks of all issues in JQL query ?.

  • Issues parents JQL Function. This is JQL function "issuesParents(?)" which returns list of issues that are parents of all issues in JQL query ?.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

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...

785 views 2 19
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you