• Community
  • Products
  • Jira
  • Questions
  • How do I filter for all user stories which has at least one task assigned to user X, and for all of their sub tasks?

How do I filter for all user stories which has at least one task assigned to user X, and for all of their sub tasks?

I like to add a filter which get all user stories and tasks, that user X has at least one task.

For example:

  1. User story 1: 
    1. Task 1 (assigned to user A)
    2. Task 2 (assigned to user A)
    3. Task 3 (assigned to user B)
  2. User Story 2: 
    1. Task 4 (assigned to user A)
    2. Task 5 (assigned to user A)
  3. User Story 3:
    1. Task 6 (assigned to user B)

I like to filter by user A, so I will get User Story 1 +2 and tasks 1,2,3,4,5.

User story 3 + task 6 will be not be returned as part of the filter, because both not related to user A.

 

Thanks

 

2 answers

This should do the trick I think:

issueFunction in subtasksOf('issueFunction in parentsOf("assignee = currentUser()")') or issueFunction in parentsOf("assignee = currentUser()")

It's something I quickly threw together so it might be improved but it should do the trick.

If you have Scriptrunner installed you can use

(issuetype = story and issuefunction in parentsOf("issuetype = subtask and assignee = A")) or (issuetype = subtask and assignee = A)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,307 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot