Hi,
i am getting the follwing from the logs while running a script as post function for SubTask creation.
java.lang.NullPointerException: Cannot invoke method contains() on null object
at Script7.run(Script7.groovy:5)
The code used is working fine but throws exception in the logs
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.issuetype.IssueType
if ((issue.issueTypeObject.name == 'Web') || (issue.issueTypeObject.name == 'Email') || (issue.issueTypeObject.name == 'Maintenance')) {
if (cfValues['Translation(s)']*.value.contains("Vietnamese")) {
IssueType issueType = ComponentAccessor.getConstantsManager().getIssueTypeObject("10903");
for(subTask in issue.getSubTaskObjects()) {
if(subTask.getIssueTypeObject().equals(issueType)) {
return false;
}
}
return true;
}
}How can this be rectified?
Thank you!