Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to create a filter where it returns all sub-tasks that a parent story has xyz

This is what I am trying to create a filter for:

  1. Project = X
  2. Story has a field Y with value of "US"
  3. In the board, I would like a filter that returns all sub-tasks with a parent story that has #2 above. 

Work around is I put "US" in all the sub-tasks but I want to avoid that and pull based on stories that have "US" in them.



2 answers

2 accepted

1 vote
Answer accepted

Hi @Emily Mason 
If you have scriptrunner, you could use "subtasksOf" in your jql.


issueFunction in subtasksOf("project=XXXX and yourField = XXX ") 

That jql returns the subtasks.

Thank you. Is there a way to do this without script runner?

Not to my knowledge.
There are others plugins of course, but I dont think is doable without one.

Like pargab sala likes this

thank you. I installed script runner. 

The JQL query I used is:

issueFunction in subtasksOf("Project = S2AGT and Service Provider-BI = US")

But I got this error:

  • Error in scripted function: subtasksOf, see below
  • Error in the JQL Query: Expecting operator but got 'Provider-BI'. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 29)

The parent story has service provider-BI = US populated and I want to pull the sub-tasks that contain this US value in the story. The sub-task doesn't have US populated so trying to avoid populating the US to all sub-tasks. 

I think the problem is that you have to put inside ' ' your custom field. 
Any of this two options should work.

1)issueFunction in subtasksOf("Project = S2AGT and 'Service Provider-BI' = US")
2)issueFunction in subtasksOf("Project = S2AGT and 'Service Provider-BI' ~ US")

The second one did the trick Gustavo. Thank you so much for saving me hours to look into a solution. Have a great day!

No problem, have a nice day

0 votes
Answer accepted

script runner is helpful here

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events