Hello all together,
I'm in Jira Datacenter 9.4.8 running Automation for Jira version 9.1.1 and ScriptRunner version 8.29.0.
Within a manually triggered automation rule I need a groovy script to add the components of some linked issues to the trigger issue.
I've tried many ways, but there seems to be no way to do the add.
I've found some ways where I didn't get any error, but the components were not added.
This is one of my variants for you to understand what I'm trying to do:
import com.atlassian.jira.component.ComponentAccessor
def linkedIssues = ComponentAccessor.getIssueLinkManager().getOutwardLinks(issue.getId())?.findAll
{it.issueLinkType.inward == "Ticket enthalten in Softwarefreigabe / Issue included in Software Approval"}
def linkedIssue = null;
def comp = null;
for (int i = 0; i < linkedIssues.size(); i++) {
linkedIssue = linkedIssues[i].destinationObject
comp = linkedIssue.getComponents()
issue.components.addAll(comp)
}
Unfortunately your script doesn't bring any error (like mine) but does not have any effect on the issue (like mine).
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.