Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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 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
Community showcase
Published in Agile

Join us LIVE: Atlassian & Experts Talk Research & Insights @ Scale

Hello all! What have you learned from your customers lately? Our live-streamed series continues by exploring CX, UX, and the power of research & insights at scale with Leisa Reichelt, Head of R...

269 views 3 6
Read article

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