Hi all, I am trying to figure out the jql statement that will list parent tasks that have the current user as either an assignee or have the current user the assignee as a sub task.
Is this possible?
Hi John,
I had a similar requirement but wanted for all users and used:
project = someProject AND (issuetype in subTaskIssueTypes() OR issueFunction in hasSubtasks()) ORDER BY priority DESC, updated DESC
Hi @John Hamman,
My name is Prosper, a support engineer at Appfire, and I’m here to help you.
As @Samuel Gatica _ServiceRocket_ as said, unfortunately natively, you’ll not be able to do get your desired result.
In the app where my team works, JQL Search Extensions for Jira, you can use the query below to find parent tasks assigned to the current user or find tasks were a sub task is assigned to the current user:
issue in parentsOfIssuesInQuery("assignee=currentUser()")Please contact our support if you have any other questions about this query.
We’ll be happy to help you!
Best regards,
Prosper.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Hamman
Welcome to the community!
Unfortunately, the desired query cannot be accomplished using native JQL.
You will need to install a third-party add-on, such as Script runner, and then you can execute the following JQL:
assignee = currentUser() AND issueFunction in parentsOf("assignee = currentUser()")
Explanation:
By combining these two conditions, the query lists the parent tasks that either have the current user as the assignee or have sub-tasks where the current user is the assignee.
Hope this helps!
Best regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Sam!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam! What if I wanted to be able to do this same thing, but with dynamic selection on a dashboard? Like if I wanted to select a user from a Rich Filter Controller in a Jira Dashboard, and return the parent tasks that have the user as the assignee on either the parent task or the sub task.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.