It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

search for subtasks of parents that meet certain criteria and include parent

Hi,

I am trying to search for the following and needing some help.

  • Show stories that are not in backlog and grooming status
  • Show subtasks of all stories that meet the above criteria

We have ScriptRunner installed, which is helpful to find the subtasks, but it does not include the parent when using the available. Below is the query that scrip runner is running.

issueFunction in subtasksOf("project = "XXXX" AND issuetype in standardIssueTypes() and status not in (Cancelled, Backlog, grooming)")

How can I get parent stories to be included in the results?

Thanks in advance for your help.

1 answer

1 accepted

0 votes
Answer accepted

Hi @Jira Subsari

You'll need to append a search for the stories also - so for example:

issueFunction in subtasksOf("project = "XXXX" AND issuetype in standardIssueTypes() and status not in (Cancelled, Backlog, grooming)") or project = "XXXX" AND issuetype in standardIssueTypes() and status not in (Cancelled, Backlog, grooming)

An alternative is to search for the stories first - for example:

project = "XXXX" and status not in (Cancelled, Backlog, Grooming) and issuefunction in hasSubtasks() or issueFunction in subtasksOf("project = "XXXX" and status not in (Cancelled, Backlog, Grooming) and issuefunction in hasSubtasks()

^ Assuming sub-tasks are under stories, something like this should also work :)

 Ste

Ah, the inclusion of the simple OR statement. :D 

This worked, thanks for your help with this @Ste 

Like Ste likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

247 views 1 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you