• 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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

477 views 6 11
Read article

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