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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,414,340
Community Members
 
Community Events
170
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.

 

Thanks! 

2 answers

2 accepted

1 vote
Answer accepted

Hi @Emily Mason 
If you have scriptrunner, you could use "subtasksOf" in your jql.
https://scriptrunner-docs.connect.adaptavist.com/jiracloud/enhanced-search.html#_subtasks

e.g.

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
TAGS

Atlassian Community Events