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

0 votes
Accepted answer

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 vote

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.

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 Sign up to answer
Community showcase
Posted Thursday in Jira

Continuous visibility with the new Jira Software Cloud and Bitbucket Cloud integration

Hey Atlassian community, I am a PM on the Bitbucket Cloud team and I am excited to share that we just released an improvement to the Jira Software and Bitbucket Cloud integration. With the newly im...

111 views 0 4
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