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

Jira Subsari September 9, 2019

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
Ste
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 9, 2019

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

Jira Subsari September 10, 2019

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