Hi,
I am trying to identify a cloned issue using a post-function on create step of the workflow.
If it is a clone, I will like to perform some changes in the issue(custom fields, summary, assignee)
Is it possible? Anyone knows how? I tried several variants none seems to work
Below is the clearest one, I am using scriptrunner but...not working
Any idea? This script always return something in else. The name of the link is correct, tryed uppercase, all lowercase. same result. I think I'm missing something.
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.user.util.UserManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkManager
import com.atlassian.jira.issue.link.IssueLink
import com.atlassian.jira.issue.link.IssueLinkTypeManager
import com.atlassian.jira.event.issue.link.IssueLinkCreatedEvent
def linkManager = ComponentAccessor.getIssueLinkManager()
if (linkManager.getOutwardLinks(issue.getId()).any {IssueLink link ->
link.getIssueLinkType().getName() == "Cloners"})
{
//do something
}else{
//nothing
}
Thanks