JQL to ignore but not prevent viewing sub-tasks

Des Kelly January 25, 2021

Hope someone can help with a quick filter challenge. I'm pretty sure my overall approach is wrong (not a dev or techie) and would be grateful for any pointers.

SCENARIO: we prefix out top 5 kanban issues (but not their sub-tasks) P1 to P5 so we can easily isolate them at stand-ups, etc. I want quick filters to return the Pn issues (and their sub-tasks) and another to return the non-Pn issues (and their sub-tasks) Here's what I've tried...

Return Ps 

summary ~ P1 OR summary ~ P2 OR summary ~ P3 OR summary ~ P4 OR summary ~ P5

This works except I can't expand the swimlane to see the associated sub-tasks because they're excluded as they don't have the Pn indicator.

Return not-Ps (ver. 1)

summary !~ P1 OR summary !~ P2 OR summary !~ P3 OR summary ~ !P4 OR summary !~ P5

This doesn't work because sub-tasks don't carry the Pn prefix and the issue and sub-tasks are returned.

Return not-Ps (ver. 2)

So I excluded the sub-task issuetype:

NOT (summary ~ P0 OR summary ~ P1 OR summary ~ P2 OR summary ~ P3 OR summary ~ P4 OR summary ~ P5) AND issuetype != Sub-task

This returns the correct issues at the cost again of being unable to expand the swimlane to see the sub-tasks because they're now excluded!

Thanks :-)

1 answer

0 votes
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2021

Hi Des,

Thank you for your question.

I can confirm that if you want to return the issues within the subtasks as well then you will need to install an add on that provides a search function that can search for subtasks below an issue that macth a specific query.

I can confirm that ScriptRunner for Jira can do this and we have a version of this for Jira Server / Data Center or Jira Cloud.

If you are uisng Jira Cloud then ScriptRunner for Jira Cloud can help with this with the subtasksOf() JQL function that it provides here which means you would be able to write your current query and then a query to return the subtasks below those issues using a syntax similar to as shown on the documentation page above.

I can also confirm that if you are using Jira Server / Data Center  then ScriptRunner for Jira Server / Data Center can help with this with the subtasksOf() JQL function that it provides here which means you would be able to write your current query and then a query to return the subtasks below those issues using a syntax similar to as shown on the documentation page above. 

I hope this information helps.

Regards,

Kristian

Des Kelly January 27, 2021

Thanks for the excellent feedback, Kristian. Really appreciate it and I'll look into the ScriptRunner add-on soon.

 

Cheers, Des

Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 28, 2021

Hi Des,

You are welcome.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events