JQL: Parent is a specific issue type

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

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!

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!

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

1 votes

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!

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

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

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!

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.

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")



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

0 votes

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!

How to use add on once installed?

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

[For JIRA Cloud]

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

Is this currently available in Jira Server?

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.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,831 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot