It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Condition for Clone of issue

I am updating a transition in the workflow with a clone as part of the transition.   It will clone the issue from the "Customer" project to the "Development Team" project when the customer issue is approved.

However, I would like to add a condition that would allow this to happen only if the issue has not already been cloned.  In the set up there is a section for Condition but I have not been able to get it to work if there is already a cloned issue off the issue and it just clones a new issue.


Here is the condition that I have tried to get working:

!issueLinkManager.getInwardLinks(issue.getId())*'is cloned by')

Like I said it just ignores it and creates a new clone anyway.


Here is the screen that I am talking about:


1 answer

1 accepted

0 votes
Answer accepted

Hi Alex,

Could you try the following?


import com.atlassian.jira.component.ComponentAccessor

// Services & Managers
def issueLinkManager = ComponentAccessor.issueLinkManager

// You must change the following variables as your needs
def linkDesc = "is cloned by"

// Look for all linked issues
def anyInwardLinkedIssues = issueLinkManager.getInwardLinks({issueLink -> issueLink.issueLinkType.inward.equalsIgnoreCase(linkDesc)}
def anyOutwardLinkedIssues = issueLinkManager.getOutwardLinks({issueLink -> issueLink.issueLinkType.outward.equalsIgnoreCase(linkDesc)}
return !(anyInwardLinkedIssues || anyOutwardLinkedIssues)



OMG... that so worked... Thanks so much


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Introducing new features for Jira Software Cloud's roadmap

Hi Atlassian community, A few months ago, we offered a sneak peak of the new hierarchy view on the roadmap. Thank you for all the feedback (and excitement) and for helping us shape the direction of...

24,932 views 116 85
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you