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

How to get a list of sub-tasks based on a list of parent ids/key

I'm trying to figure out how to get a list of sub-tasks given a list of parent ids or keys and the sub-task summary contains certain text.

Each top level issue has a number of sub-tasks.  Each sub-task summary follows a specific naming convention and part of the summary text is the same for each sub-task of each issue.  I'm trying to generate a list of sub-tasks so that I can do a bulk change like setting the FixVersion.

Here is a sample idea using a SQL query

select sub-task where sub-task.parentID in ("xyz1","xyz2","xyz3") and sub-task.summary constains "text substring"

So far I've gotten the following JQL that executes with no errors, but also not getting any results.

project = XYZ AND issuetype = Sub-task AND issueFunction in parentsOf("Key=XYZ")

2 answers

1 vote
Jack Community Leader Oct 25, 2019

you mention "given a list of parent ids" so am assuming it is a static list. if so, what about something like this....

issuetype=Sub-task and summary ~"this-text" and parent in (xyz-34, xyz-39, ...)

I could have sworn I tried that.  It works.  Thanks!

Hi Omar,

As Jack already suggested, given a static list of parent IDs you must use parent field in combination with issuetype and summary fields to retrieve the desired subtask issues.

 

In addition to this suggestion, in case you want to retrieve subtask issues matching an specific summary but in a list of dynamic parents you must go for a third-party app.

i.e. using JQL Booster Pack (FREE) you query will look like:

Retrieve any subtasks containing "this-text" in the summary directly created under unresolved Stories of project EMEA

 

summary ~ "this-text" AND issue IN subtasksOf('project = EMEA AND type = Story AND resolution IS EMPTY')

 

That's pretty the same you already typed however you used parentsOf() function which seems to be incorrect.

 

Kind Regards

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

335 views 1 3
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