Hi,
can some one help on how to get list of associated issues (i,e Issues in Epic) for an EPIC Issue Type using a groovy script?
From the associated issues list, I would like to check issue type of the "associated issues" using groovy script and need to update the specific custom field value, when a specific issue type = CIL in my post function.
Is the below code snippet can be used to get the "Issue in Epic", but I am not sure what is the value should be used for "<Name of Link>" for "Issues in Epic" unlike Blocks/Cloners, etc as it will not be defined as part of the "Issue linking". Please advice.
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
def greatestDate;
issueLinkManager.getOutwardLinks(<a href="http://issue.id" rel="nofollow noopener noreferrer">issue.id</a>).each {issueLink ->
if (<a href="http://issueLink.issueLinkType.name" rel="nofollow noopener noreferrer">issueLink.issueLinkType.name</a> == "<Name of Link>") {
def linkedIssue = issueLink.destinationObject
}
}
Please suggest how to get this in groovy script.