Dashboard - Custom JQL to Show Issues based on Sub-Tasks
Asked by David Eade:

Hi, I have a project that has a volume of Stories and Tasks, and I want to provide a dashboard based on the assignees of the sub-tasks of these.

I'm not sure what the syntax would look like - or if it's at all possible.

Any advice would be most appreciated.

Thanks Dave


Answers:
author: Jakub Koc
body: The query you are looking for is 'issuetype = Sub-task and assignee = currentUser()'

Mind that there are 2 kinds of subtasks on default, subtask \& sub-task so you might need to try both of them, in the filter view add 'Parent' column  

Although without detailed view I'm not sure if you would be able to see the assignee of both Task and subtask at the same moment. Maybe if you would create some custom field and make it appear in column view as "Parent assignee" or something like that.

comments: author: David Eade
body: Hi I think you're misunderstanding the question.

I'm not looking for the sub-tasks that are assigned to me - I'm looking for a list of the parents - so the query should look something like this.

issuetype = story, **and** **Sub-task assignee** = currentUser()'

It's the bit in bold I'm having trouble with - I know the link exists as it's shown on the breadcrumb and you can navigate between parents and children - it's getting that link exposed in the query to bring back a set of results.


author: Jakub Koc
body: I'm afraid I won't be able to help you then. With Jira out of the box   
from subtask point of view you can search for a parent but unfortunately it doesn't work the other way around and subtask field is not searchable from parent.

Only way to achieve what are you looking for is probably using some 3rd party app like ScriptRunner or one of examples shown below:  
[JQL for Jira Extension](https://marketplace.atlassian.com/apps/1214791/jql-search-extensions-for-jira-reports?hosting=cloud&tab=overview&utm_source=atlassiancommunity&utm_medium=listinglink&utm_campaign=muhammad&_ga=2.186150186.2064435396.1587822281-1390756080.1565162007)   
[JQL Booster Pack](https://marketplace.atlassian.com/apps/1218367/jql-booster-pack?hosting=datacenter&tab=overview)

Eventually you can create a separate filter for yourself where you can actually see the parent of the issue

![Screenshot 2024-08-08 at 10.51.31.png](https://community.atlassian.com/t5/image/serverpage/image-id/340690iB8699E435BBAC77D/image-size/large?v=v2&px=999 "Screenshot 2024-08-08 at 10.51.31.png")


author: David Eade
body: Ok, thanks Jakub - I thought that might be the case but was forever hopeful!

Appreciate your input.

Dave


author: Jakub Koc
body: There are many widgets in dashboards, could you explain in a bit of more detail how would you like to do it?  

Basically your query would need 'order by assignee' at the end of it to just sort them like that, for example 'project = AAA order by assignee'.  

comments: author: David Eade
body: Hi, it's not the ordering that I need help with - it's how to link sub-tasks with their parents, and display information in a list of parenst, based on criteria of sub-tasks.

For example:

Task 1 is assigned to Ben - has sub task12 - subtask 12 is allocated to me

Story 4 is assigned to Joe - has sub task 14 - subtask 14 is allocated to me

I need a logic statement that says "show issues where issue sub-task assignee = me"


author: Jakub Koc
body: I'm not sure why its not letting me reply but maybe adding image would work:![Screenshot 2024-08-07 at 14.00.44.png](https://community.atlassian.com/t5/image/serverpage/image-id/340505i971CC946C6B0EC7A/image-size/large?v=v2&px=999 "Screenshot 2024-08-07 at 14.00.44.png")

In filter you can also add column with 'parent' of the issue


author: David Eade
body: There is no column with the value 'parent' - there is 'Parent Link' or 'Parent Issue Key' - neither of which returns any values - see attached...

![Jira.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/340679iD93732CE0613DFEA/image-dimensions/222x347?v=v2 "Jira.JPG")


Tags: cloud

dashboard

jcl

jira-cloud