Filter to show sub tasks of a filtered list of parent tasks
Asked Answered
G

5

34

I have a JIRA filter which returns all the fixes in a future release:

project = MyProject AND fixVersion = "1.1.1" and issuetype in standardIssueTypes() and status != Closed

All of these issues have Sub-Tasks which I want to have in a new filter result. They do not have the fixVersion set.

I have tried the parent filter but this only accepts Key or ID.

Is there any way I can write a filter to access these without manually using something like parent in (MyProject-1,MyProject-2,MyProject-3,MyProject-4,etc)?

Glossotomy answered 1/3, 2011 at 10:7 Comment(0)
S
9

I have a solution that requires no plugins whatsoever, but some manual work that is much better than listing the tasks in the query itself:

Using the linkedIssues function, you can write a query like so

parent in linkedIssues("PROJ-1061")

Now, link all the issues you want in this query to the PROJ-1061 and you're golden. You can do this in a bulk job, you can also add it as a trigger in a workflow potentially.

Shaggy answered 30/1, 2018 at 13:2 Comment(4)
this wasn't available in the version of jira we were using at the timeGlossotomy
It would be perfect, but I am not able bulk-add the link to many issues. I have ~50 issues to link and doing it manually is a nightmare. Any suggestion? (using jira cloud)Blindage
This did not work for me without the plugin. I get the error message "JQLT Custom field is not configured. Please check with your administrator".Feigin
For JIRA v7.6.9 : issue in descendantIssues("PROJ-XX")Briolette
U
16

You can install the Craftforge JQL functions https://plugins.atlassian.com/plugin/details/31601

You then create a filter

project = MyProject AND fixVersion = "1.1.1" and issuetype in standardIssueTypes() and status != Closed

Call this filter for example 'parentIssues'

Using the JQL

issue in subtaskIssuesFromFilter("parentIssues")

will retrieve all relevant subtask issues.

Undertrick answered 1/3, 2011 at 12:56 Comment(3)
Looks exactly what I need! Unfortunately I am not an admin of the server. I have passed it on to see if the admin will install it.Glossotomy
You can tell your admin that we are using it in production, and that we didn't encounter an issue until now.Undertrick
He is ok with the plugin, but our version of JIRA is too old. He is using it as an excuse to do the upgrade that has been put off for a while!Glossotomy
S
9

I have a solution that requires no plugins whatsoever, but some manual work that is much better than listing the tasks in the query itself:

Using the linkedIssues function, you can write a query like so

parent in linkedIssues("PROJ-1061")

Now, link all the issues you want in this query to the PROJ-1061 and you're golden. You can do this in a bulk job, you can also add it as a trigger in a workflow potentially.

Shaggy answered 30/1, 2018 at 13:2 Comment(4)
this wasn't available in the version of jira we were using at the timeGlossotomy
It would be perfect, but I am not able bulk-add the link to many issues. I have ~50 issues to link and doing it manually is a nightmare. Any suggestion? (using jira cloud)Blindage
This did not work for me without the plugin. I get the error message "JQLT Custom field is not configured. Please check with your administrator".Feigin
For JIRA v7.6.9 : issue in descendantIssues("PROJ-XX")Briolette
O
7

Use Script Runner plugin and a query like:

issueFunction in subtasksOf("project = MyProject AND fixVersion = 27_04_2013 and status != Closed"))
Overestimate answered 27/4, 2013 at 11:35 Comment(0)
C
4

JQL Tricks adds tons of additional JQL functions: https://marketplace.atlassian.com/plugins/com.j-tricks.jql-plugin

Here an example for the above using their syntax:

issue in parent("project = MyProject AND fixVersion = 27_04_2013 and status != Closed")

Cognition answered 3/6, 2013 at 13:19 Comment(0)
C
-13

There is no need for any Plugin.

Switch to "Advanced" filter option and enter

status in ("Open") AND parent in (PHX-xxx,ENG-xxx)

It will give you all the open tickets present as a subtask in parent JIRAs. Build more complex and enjoy using JIRA. Advanced filter options will also give you all possible values to build Queries.

Counterattack answered 14/11, 2013 at 15:11 Comment(5)
How does "PHX-xxx" work? Is this some sort of wildcard? I can't see how this is a filtered list of parent tasks (as per the question).Medardas
The xxx is a placeholder, they're just examples, you'd put the actual project/issue code in there.Spalato
What he wants is to get all open sub-tasks on closed parents. Your solution force him to add each and every parent-id.Aeromarine
parent = <parent-id> AND status = open worked for meJuieta
asker specifically did not want this solution.Dirigible

© 2022 - 2024 — McMap. All rights reserved.