Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Closing a cloned ticket automatically

Hi! Let´s suppose that I have two different projects: A and B. Some of the A´s tickets are cloned to the B project, where all the work is registered. 

Once I close the B ticket, is there a way in which the A ticket is automatically closed? 


2 answers

if there is a link between the two tickets, you can add a post function to transition the linked issue.

I´m sorry, but what do you mean by a link in this case? Also, I understand that post function doesn´t allow to close a ticket.

Here is an example of the link:

clone.pngif this exist then you can use a scripted post function to transition linked issue. here is an example of the scipt: 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue

def userManager = ComponentAccessor.userManager
def anuser = userManager.getUserByKey("anuser")

def issueManager = ComponentAccessor.issueManager
MutableIssue issue = issueManager.getIssueByCurrentKey("JRA-1")

//We are going to need the issueLinkManager and the issueTypeLinkManager
IssueLinkTypeManager issueLinkTypeManager = ComponentAccessor.getComponent(IssueLinkTypeManager)
IssueLinkManager issueLinkManager = ComponentAccessor.issueLinkManager

//We need two links, one for our outwardLinks, and the other one for our inward link.
MutableIssue outwardLinkTarget = issueManager.getIssueByCurrentKey("JRA-3")
MutableIssue inwardLinkTarget = issueManager.getIssueByCurrentKey("JRA-4")

def linkTypes = issueLinkTypeManager.issueLinkTypes
def blocksLinkId = linkTypes.find { == "Blocks" }?.id

//This is how you create an outwardlink, by setting the second parameter to your other issue
issueLinkManager.createIssueLink(,, blocksLinkId, 1L, anuser)
//This is how you create an inwardlink, by setting the second parameter to your original issue
issueLinkManager.createIssueLink(,, blocksLinkId, 1L, anuser)


More examples here:

Like Pablo Aschieri likes this
0 votes
Joe Pitt Community Leader Jul 03, 2019

Not out of the box. You may be able to write a script or find a plugin. You would also need to provide for the possibility not to close it 

Hi @Joe Pitt !

Has there been any improvement in JIRA Automation regarding this topic? My need is exactly the same described in this open thread. I have two tickets with a "Cloned" link. Once I transition one ticket, I would like to transition the cloned one.

Is there any plugin that you know that can do it?


Thanks in advance!

Joe Pitt Community Leader Dec 03, 2020

Not that I'm aware of. 

looking for the same, strange, seems sucha normal user case for automation, closing tickets in chain

@Pablo Aschieri @Joe Pitt This also is strange to me. Looking for the same functionality! 

Suggest an answer

Log in or Sign up to answer

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