I have this code
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkManager
import org.apache.log4j.Category
import com.atlassian.jira.issue.link.IssueLink
import com.opensymphony.workflow.InvalidInputException
IssueLinkManager linkMgr = ComponentAccessor.getIssueLinkManager()
for (IssueLink link in linkMgr.getOutwardLinks(issue.id)) {
log.debug("linked issue type: " + link.issueLinkType.name)
log.debug("linked issue key: " + link.getSourceObject().getKey())
log.debug("linked issue status (name): " + link.getSourceObject().getStatus().getName())
log.debug("linked issue status (id): " + link.getSourceObject().getStatus().getId())
if (!link.getSourceObject().getStatus().getName().contains("Verified")) {
log.debug("issue " + link.getSourceObject().getKey() + " is not in Active state")
invalidInputException = new InvalidInputException("Linked issue is not in a status of Template")
throw invalidInputException
}
}
here,.. it should check all the linked issues are in verified state and then change the status of the issue.
All i get is invalid error exception : null.
could anyone please help???/