Hi all!
I have found the script to get the number of outward linked issues:
import com.atlassian.jira.component.ComponentAccessor def issueLinkManager = ComponentAccessor.getIssueLinkManager() def issueLinks = issueLinkManager.getOutwardLinks(issue.id) def subElements = issueLinks.findAll { it.getIssueLinkType().getName() == "Project Scope" } return subElements.size()
I want ask if there are the way to get number only closed outward linked issue?
Thank you for help!
Community moderators have prevented the ability to post new answers.
If someone need:
import com.atlassian.jira.ComponentManager import com.atlassian.jira.component.ComponentAccessor def componentManager = ComponentManager.instance def constantsManager = ComponentAccessor.getConstantsManager() Integer counter=0; def issueLinkManager = ComponentAccessor.getIssueLinkManager() def issueLinks = issueLinkManager.getOutwardLinks(issue.id) def subElements = issueLinks.each { if(it.getIssueLinkType().getName() == "Project Scope" && it.destinationObject.getStatus().getName() == 'Closed'){ counter+= 1 } } return counter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.