Forums

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

Search for multiple linked issues

James Croft May 7, 2020

I'm trying to return a search in Jira for:

All issues in project 1, where more than one issue of ISSUETYPE2 in project 2 are linked to it. 

 

So far I have:

project = "PROJECTKEY1" AND issuetype = ISSUETYPE1 AND status not in (Done, Closed) AND issueFunction in linkedIssuesOf("issuetype = ISSUETYPE2 and project = PROJECTKEY2")

 

But the one above returns results for where one linked issue matches the criteria, not more than one.

 

Any help would be appreciated.

 

Thanks

1 answer

0 votes
Ignacio Pulgar
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.
May 10, 2020

Hi @James Croft ,

There are no extra JQL functions that will get you closer to your needs, even in ScriptRunner or JQL Booster Pack.

However, there's a workaround for helping getting issues with two or more issue links:

  1. Execute the JQL query you've got in the Issue Navigator and save it as a filter.
  2. Modify the columns of your filter in order to show at least the Issue Key and the Linked Issues columns.
  3. Export the results to CSV separated by semicolons (;).
  4. Open the resulting file in Excel. You'll notice there will be multiple Linked Issues columns. That's because that column accepts multiple values, and that's the way Jira exports those kinds of fields. You'll have as many Linked Issues columns as the number of linked issues of the issue retrieved by your query with the maximum number of linked issues.
  5. Go to the second column titled Linked Issues starting from the left, and filter by that column in order to hide rows without a value in that column.

After following these steps, your Excel filte will be showing just those issues with more than one linked issue.

You may want to copy the Issue Key column, in order to show the results again in the issue navigator with a query like:

key in (KEY-1, KEY-2, KEY-3...)

You may also perform a bulk edit operation on those issues in order to label them for finding them easier on next searches, but always having in mind that those results will eventually get obsolete over time.

Hope it helps.

James Croft May 11, 2020

Hey Ignacio, 

Thank you for the detailed reply. I had to adapt this slightly as a workaround as it appears some linked issues in the project have been done using inward links and others using outward links, so I ended up hitting another wall with this Bug  (outward issue links bug)

Exporting as HTML is the way to go, but still takes a fair bit of data manipulation to show the results and isn't as easy for end users to do on a regular basis. 

 

Cheers,

James

Ignacio Pulgar
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.
May 12, 2020

Hi James,

Sorry to hear that! An the workaround suggested in that issue is even more complex for end users...

Mmm... as you count with ScriptRunner, you may create a a Scripted Field which retrieved the number of issue links.

Fortunately, the Adaptavist Library counts with such a scripted field:

https://library.adaptavist.com/entity/number-of-linked-alerts-itsm

You'll need to adapt the code of that page to your needs.

Hope it helps.

Suggest an answer

Log in or Sign up to answer