Hi,
I need to add a Transition validation that checks if all the Linked Issues are in a done status category, if found this code:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLink
import com.opensymphony.workflow.InvalidInputException
import org.apache.log4j.Logger
import org.apache.log4j.Level
def linkMgr = ComponentAccessor.getIssueLinkManager()
for (IssueLink link in linkMgr.getInwardLinks(issue.id)) {
log.info(link.sourceObject.resolutionId)
if (!link.sourceObject.resolutionId) {
return false
throw new InvalidInputException("Issue Links must be close before continue")
}
}
But it only works on Condition, I need to set it on Validation to show the error message.
Any suggestion?
I'm very basic on Groovy