Hi Folks,
I am working on some simple script but it crashed some day ago and does not work anymore.
This one should create a clone when a custom field is YES:
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.link.IssueLink;
def customFieldManager = ComponentAccessor.getCustomFieldManager()
String customFieldValue = issue.getCustomFieldValue(customFieldManager.getCustomFieldObject((13207 as long)))
if (customFieldValue == "Yes")
{
return true
}
also I wanted to add if condition to avoid duplicates:
if (customFieldValue == "Yes"
&& !issueLinkManager.getOutwardLinks(issue.getId())*.destinationObject.projectObject.name.contains('Known Issues'))
{
return true
}
For now, the first part is working. Can you give me a hand how to add the second part?