save listener, open listener and preview, get classcastex


*This issue has moved*

This issue has been moved permanently to Adaptavist's Product Support JIRA instance.

All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the
Can't access your account link in order to reset to a new password.

I'm struggling with what appears to be inconsistent behaviour in the Script Listeners. It appears that any error in a script will corrupt the listener

Steps to reproduce:

1) Add Lsitener, "Send a custom email".

  • a) Events - "Issue Created"

  • b) Projects - "All Projects",

  • c) Condition - blank,

  • d) Email template - "bob"

  • e) Subject template - $issue

  • f) Email format - "Plain text

  • g) To addresses - my email address

  • h) To issue fields - blank

  • i) Include attachments - None

  • f) Preview Issue Key - Issue does exist

2) Preview the listener and it shows what I'd expect (send email to me with the same issue key as the preview key)

3) Add "Description: ${issue.summary}" to the Email template

3) Preview the listener and it shows what I'd expect (now includes the Summary from the issue)

4) Add Listener

5) Click on Edit

6) Change "Description: ${issue.summary}" to "Description: ${issue.summery}" delibrate "e" in summary.

7) Save Listener

8) Open Listener and preview

9) Preview fails with a "groovy.lang.MissingPropertyException: No such property: summery for class: com.atlassian.jira.issue.IssueImpl Possible solutions: summary"

10) Correct the spelling of "summary"  and preview again.

11) Fails with a message "org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'com.atlassian.jira.event.issue.IssueEvent@1ab3178" ... and details of the issue in the stack trace. The Email template shows the correct spelling of summary.

12) Update the Listener

13) Edit the Listener;

14) From here on out any Preview fails with the message from 11.

It looks like an error is not getting cleared.

I'm using v4.4#649-r158309, groovy-all-1.8.1. groovyrunner-1.7.13, java 1.6.0_21, on Win 2033x64.


Your pinned fields
Click on the next to a field label to start pinning.


Jamie Echlin


Jamie Echlin

Internal Complexity


Internal Value