Hi,
I'm trying to send custom email to reporter on issue creation using script runner.
Whar am i doing wrong?
I get error below:
Time (on server): Tue Mar 14 2017 11:07:05 GMT+0100 (Środkowoeuropejski czas stand.)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
2017-03-14 11:07:04,967 ERROR [workflow.ScriptWorkflowFunction]: *************************************************************************************
2017-03-14 11:07:04,986 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: null, actionId: 1, file: null
java.lang.NullPointerException
at com.atlassian.jira.issue.managers.DefaultIssueManager.getEntitiesByIssue(DefaultIssueManager.java:395)
at com.atlassian.jira.issue.managers.DefaultIssueManager.getEntitiesByIssueObject(DefaultIssueManager.java:410)
at com.atlassian.jira.issue.managers.RequestCachingIssueManager.getEntitiesByIssueObject(RequestCachingIssueManager.java:155)
at com.atlassian.jira.issue.comments.CommentSearchManager.getComments(CommentSearchManager.java:106)
at com.atlassian.jira.issue.comments.DefaultCommentManager.getComments(DefaultCommentManager.java:176)
at com.atlassian.jira.issue.comments.CommentManager$getComments$5.call(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail.mergeEmailTemplate(SendCustomEmail.groovy:979)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail.mergeEmailTemplateBody(SendCustomEmail.groovy:952)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail$mergeEmailTemplateBody$2.callCurrent(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail.constructMail(SendCustomEmail.groovy:474)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail$constructMail$1.callCurrent(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail.constructMailWithConditionResult(SendCustomEmail.groovy:455)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail$constructMailWithConditionResult$0.callCurrent(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail.doScript(SendCustomEmail.groovy:551)
Cancel