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?
Thanks!
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
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:
if 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.ComponentAccessorimport com.atlassian.jira.issue.MutableIssueimport com.atlassian.jira.issue.link.IssueLinkManagerimport com.atlassian.jira.issue.link.IssueLinkTypeManagerdef userManager = ComponentAccessor.userManagerdef anuser = userManager.getUserByKey("anuser")def issueManager = ComponentAccessor.issueManagerMutableIssue issue = issueManager.getIssueByCurrentKey("JRA-1")//We are going to need the issueLinkManager and the issueTypeLinkManagerIssueLinkTypeManager 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.issueLinkTypesdef blocksLinkId = linkTypes.find { it.name == "Blocks" }?.id//This is how you create an outwardlink, by setting the second parameter to your other issueissueLinkManager.createIssueLink(issue.id, outwardLinkTarget.id, blocksLinkId, 1L, anuser)//This is how you create an inwardlink, by setting the second parameter to your original issueissueLinkManager.createIssueLink(inwardLinkTarget.id, issue.id, blocksLinkId, 1L, anuser)
More examples here: https://library.adaptavist.com/entity/add-or-update-the-issue-link-for-an-issue-in-jira
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!
Not that I'm aware of.
looking for the same, strange, seems sucha normal user case for automation, closing tickets in chain
It looks like you're new here. Sign in or register to get started.