Hi, I'm trying to create a listener which will send an email when the number of watchers goes to zero. While I can get it to work in the Preview, when I go live with it, I get an error:
2020-05-07 13:41:26,074 ERROR [runner.AbstractScriptListener]: *************************************************************************************
2020-05-07 13:41:26,074 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.issue.IssueWatcherDeletedEvent, script: com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'com.atlassian.jira.event.issue.IssueWatcherDeletedEvent@177e124f' with class 'com.atlassian.jira.event.issue.IssueWatcherDeletedEvent' to class 'com.atlassian.jira.event.issue.IssueEvent'
This happens even if I comment out all the script, so it appears to be an issue with the event itself. Any thoughts or ideas for what I could try?