Hello!
Please help me figure it out, I've been struggling with this problem for a week now.
I'm trying to come up with an algorithm so that I can add values from a trigger task to the entire chain of related tasks.
My germ of code that I ended up with (I'm using the script console - scriptrunner):
import com.atlassian.jira.issue.link.IssueLink ;
import com.atlassian.jira.comComponent.ComponentAccessor ;
List issuesFromEpic = []
def Issue = Issues .getByKey( 'PROJECT-4198' ) //issue trigger
IssueEpicLinkName = ComponentAccessor .getIssueLinkManager().getOutwardLinks(issue.getId())findAll {
it.issueLinkType.outward == "blocked"
}*.destinationObject
IssueFromEpic += Issue
IssuesFromEpic += "blocked ->" + IssueEpicLinkName
return IssueFromEpic
//output: [PROJECT-4199]
(PROJECT - 4198 blocked-> [PROJECT-4199])
//output: [PROJECT-4199]
//Next expected result:
//get [PROJECT-4199]]
//[PROJECT - 4199, blocked ->[PROJECT-4200]]
//get [PROJECT-4200]]
//[PROJECT-4200, blocked ->[PROJECT-4201]]
Total :
List = [PROJECT - 4199, PROJECT-4200,PROJECT-4201]
Thanks for any help.
Best regards, Alex.