There are two issue types in my epic. Now I want to work on the workflow of these two issue types. When all the issue of a certain problem type reach a certain state, the epic workflow will reach a certain state correspondingly. The following is the statement I wrote in the condition of the event after the workflow transformation, but I report an error every time. Can someone help me? Thank you very much
flaglist=[]
length1=issue.epic.stories.size()
for(int j=0;j<=length1;j++){
if(issue.epic.stories[j].issueType.name=="需求任务"){
if(issue.epic.stories[j].status.name=="设计待内审"){
flaglist.add(1)
}else{
flaglist.add(0)
}
}else{
continue;
}
}
length2=flaglist.size()
if(flaglist.contains(0)){
return false;
}else{
return true;
}
There was an error during the execution of your script against issue SAMPLESS-334
Message:
java.lang.NullPointerException: Cannot get property 'issueType' on null object
Stack:
org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:190)
org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:46)
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:298)
script_9b747e64a039e346c8f58bcf661f3f26.run(script_9b747e64a039e346c8f58bcf661f3f26.groovy:6)