• 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 Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

21,713 views 2 7
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