Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for an Exception Query to find Epics without a parent

David Updike
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 2, 2018

I have a 4 level hierarchy

Initiative

   Capability (child of Initiative link to parent Initiative)

      Epic (child of Initiative link to parent Capability) 

         Story

 

Initiatives and Capability are in Project A because they are common across a portfolio

Epics and Stories are in Project B, C, D, etc. because there is 1 project per Service Line

 

Sometimes people will create an Epic but forget to link it to the parent Capability. I'm trying to run a JQL that will show me all of the Epics in Project B that are not linked to a Capability in Project A.

I've tried various ways but nothing works. Any ideas?

 

1 answer

0 votes
Alexey Matveev
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.
February 2, 2018

You would need an add-on like Power Scripts or Adaptivist ScriptRunner. For example, if you have Power Scripts then you could write a script with a name hasLinks.sil like this

string [] keys = selectIssues(argv[0]);
string [] ret;

for(string issueKey in keys) {
   if (size(allLinkedIssues(issueKey, argv[1])) > 0) {
       ret += issueKey;
   }
}
return ret;

then you could use it in advanced search like this

 key in silJQLList("hasLinks.sil", "issuetype = Epic", "Yourlinktype")

David Updike
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 2, 2018

Thank you Alexey

I probably should have mentioned that we use Script Runner.  How much different is the script?

Alexey Matveev
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.
February 2, 2018

Scriptrunner has a builtin function. You could do something like this

issueFunction in hasLinks("your link name") and issuetype = Epic

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events