Hello everybody,
I'm new to ScriptRunner and try to make a script function "Clones an issue and links".
I would like to make a simple condition, that will only process the Clone if there is no linked issue with the Inward Link "Kunden-Ticket übernommen nach".
I found @JamieA 's Post in this topic and tried to adapt it, but it doesn't work. Everytime a new Clone is created.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkManager
def issueLinkManager2 = ComponentAccessor.getComponent(IssueLinkManager)
! issueLinkManager2.getInwardLinks(issue.getId()).any {
it.issueLinkType.name == "Kunden-Ticket übernommen nach"
}