JQL: Parent is a specific issue type

Karie Kelly
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2013

Does anyone know of JQL or maybe a plugin that could support the question:

Find all subtasks that have a parent that is an issuetype = Epic.

6 answers

1 accepted

2 votes
Answer accepted
Jeison
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2013

Or you could just use this query from JIRA:

"Epic Link" is not EMPTY and issuetype in subTaskIssueTypes()

Note that this will only work in GreenHopper versions above 6.x (if I'm not mistaken).

Hope it helps!

Karie Kelly
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2013

That definitely does work for our case; I used epic as an example, but we also want to use this same type of query for other issue types. Thanks!

1 vote
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2013

Also available if you install script runner plugin (free):

issueFunction in subtasksOf("issuetype = Epic")

Performance testing shows it's much faster than the other two!

Monika Katipally January 23, 2017

How to use add on once installed?

Write the above query in JQL search or the plug in search?

[For JIRA Cloud]

Jon Mort [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2017

Hi Monika,

We are currently working on that functionality for JIRA Cloud. It should be ready soon, but I'm not able to commit to a time frame except that it will be weeks rather than months.

Jon

Sam Harmon July 7, 2017

Is this currently available in Jira Server?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2017

Yes, if you use the plugin mentioned above: https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner/server/overview

Several other plugins have similar functions.

1 vote
Jamie Echlin March 14, 2013

Also available if you install script runner plugin (free):

issueFunction in subtasksOf("issuetype = Epic")

Performance testing shows it's much faster than the other two!

Karie Kelly
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2013

I actually just installed script runner to see if I could do something like that. Thanks for the example as I can test it out this evening.

Like Dave Liao likes this
Raju Adluru
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2013

Jamie

how can i add a simple validation using script runner to check if an issue type is linked to an issue? thanks.

I tried this code below - even though i linked issue type Chg Request to parent issue, it still shows error message, validation is not working correctly, am i missing anything here?

issueFunction in linkedIssuesOf("issuetype = Chg Request")



JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 15, 2013

For conditions or validations, you'd use the jql query condition. You need to use single quotes around the Chg Request too.

1 vote
Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2013

Hey there, Karie!

This is possible to achieve by using the Craftforge JQL Functions Plugin, which finds all sub-tasks of parents found by a specified query . You should use a query like the following:

issue in subtaskIssuesFromQuery("issueType = \"Epic\"")


I hope this helps!

Raju Adluru
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2013

Hi Matheus, without this plugin, how can i add a validation using simple script to check if an issue type is linked to an issue? thanks

1 vote
codelab expert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2013

You can use this plugin: https://marketplace.atlassian.com/plugins/com.j-tricks.jql-plugin. It has some fine features like subtask(JQLQuery).

0 votes
Karie Kelly
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2013

Thanks for both suggestions! They both seem to be great additions. Appreciate the quick responses!

Suggest an answer

Log in or Sign up to answer