I want to find all the cloned issues from a list of issues in JIRA

Phaneesh C Gopisetty July 11, 2019

Hi Team,

I have a project where 33 stories are created first. Later they have been cloned and moved to other projects across the Org. Now I am trying to find all the cloned ones. IinkedIssues only allows me to find one at a time and I have 33 of them that I am trying to create a report.

Below is what I am need and it doesnt work

issue in linkedIssues("X-2" ,"X-3" ,"X-4" ,"X-5" ,"X-6" ,"X-7" ,"X-8" ,"X-9" ,"X-10" ,"X-11" ,"X-12" ,"X-13" ,"X-14" ,"X-15" ,"X-16" ,"X-17" ,"X-18" ,"X-19" ,"X-20" ,"X-21" ,"X-22" ,"X-23" ,"X-24" ,"X-25" ,"X-26" ,"X-27" ,"X-28" ,"X-29" ,"X-30" ,"X-31" ,"X-32" ,"X-33" ,"X-34")

I do not have Script Runner installed in my Org

Thanks in Advance

JIRA Version - Jira v7.12.3

5 answers

4 votes
Jeremy Price July 11, 2019

If you are on Jira version 8.1 you should be able to run the JQL below and get every ticket that has been cloned. 

issueLinkType = clones

Then you can break down the types of tickets to make the list shorter as I'm sure that initial JQL will return a lot of different values. 

You can also try this JQL if you know the statuses that it may have been in and the status it is went into. Then of course break it down further ti better find those tickets 

status changed FROM "any status" TO "any status"

1 vote
Ste
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2019

Hi @Phaneesh C Gopisetty

In v.7.12.3 it's not possible to create the query this way without a plugin like ScriptRunner.

It is possible in Jira 8 - there is now a issueLinkType search function which you can view more about by clicking here.

If you need to do it in V.7.12.3 - you'll need to build each linked issues search separated with OR statements - such as:

issue in linkedIssues("X2") or issue in linkedIssues("X3") or issue in linkedIssues("X4")

^ If you have a large number of these to search, you could use Excel or similar to build the query for you. In Excel:

  • Put "issue in linkedIssues(" into Column A
  • Put a list of Jira Keys you want to search in Column B
  • Put  ") OR  into Column C
  • Concatenate these three columns together and copy/paste these results as values
  • Move the first concatenated result into the next column over - for example, if you have concatenated A1 - C1 and have this result in D1 - move it to E1.
  • In E2, Add E1 and D2 together - then apply to all rows. This will create your query.
  • Paste into Jira search bar

^ There is probably a quicker method but this is a simple, easy method :)

Ste

Sherry M Rodulfo December 17, 2019

I tried this, and it worked:

... AND (summary ~ clone OR text ~ cloned)

Like Alex likes this
Phaneesh C Gopisetty December 17, 2019

Hi Sherry,

This will only work when the cloned issue type summary is not changed. Most of the time it is changed.

Sherry M Rodulfo December 17, 2019

yeah, but the:

text ~ cloned

will capture it. Hence, the OR statement after.

0 votes
Ste
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2019

Hi @Phaneesh C Gopisetty

Without ScriptRunner on v7.12.3, the above wouldn't work. You'd need to search for each key individually - so for example:

issue in linkedIssues("X-2") or issue in linkedIssues("X-3") or issue in linkedIssues("X-4")

Rather than typing this all out, you could use Excel to create your query - for example:

  • In Column A put issue in linkedIssues("
  • In Column B put each issue key (exported from Jira)
  • In Column C put ") OR 
  • CONCAT these three columns together
  • Copy & Paste as Values
  • Copy the first completed concatenation into the next cell over. For example if the three partials above are in A1 - C1, the completed concatenation will be in D1 - copy this to E1.
  • Add E1 to D2 - and then copy down column E. This will add all the concatenations together :)
  • Copy into issue search bar

^ There is probably a quicker way but this is a nice, simple method.

The alternative is to upgrade to Jira 8 - in the newer versions of Jira you can search via Issue Link Type - see here for more information: https://confluence.atlassian.com/jiracoreserver/advanced-searching-fields-reference-939937719.html?&_ga=2.64186223.1963617201.1562539981-102198230.1550540771#Advancedsearching-fieldsreference-issuelinktypeIssuelinktype

0 votes
Jeremy Price July 11, 2019

If you are on Jira version 8.1 you should be able to run the JQL below and get every ticket that has been cloned. 

issueLinkType = clones

Then you can break down the types of tickets to make the list shorter as I'm sure that initial JQL will return a lot of different values. 

You can also try this JQL if you know the statuses that it may have been in and the status it is went into. Then of course break it down further ti better find those tickets 

status changed FROM "any status" TO "any status"

0 votes
Jeremy Price July 11, 2019

If you are on Jira version 8.1 you should be able to run the JQL below and get every ticket that has been cloned. 

issueLinkType = clones

Then you can break down the types of tickets to make the list shorter as I'm sure that initial JQL will return a lot of different values. 

You can also try this JQL if you know the statuses that it may have been in and the status it is went into. Then of course break it down further ti better find those tickets 

status changed FROM "any status" TO "any status"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events