Hi everyone.
I'm trying to obtain the status and project key of linked issues to create a clone of the main issue but when I'm applying the log the project and status have false value and doesn't have de Project key and status.
following my code.
import org.apache.log4j.Category
def Category log = Category.getInstance("com.onresolve.jira.groovy")
log.setLevel(org.apache.log4j.Level.DEBUG)
def issuelinkPJ = issueLinkManager.getOutwardLinks(issue.id).any{it.destinationObject.getProjectObject().getKey()}
def ORstatus = issueLinkManager.getOutwardLinks(issue.id).any{it.destinationObject.getStatus().getName()}
if (!issueLinkManager.getOutwardLinks(issue.getId())*.issueLinkType.name.contains('is blocked By')) {
if (issuelinkPJ == 'OR' && ORstatus == 'Blocked'){
return true
}
}