-
Type:
Bug
-
Status: Done (View Workflow)
-
Priority:
High
-
Resolution: Done
-
Affects Version/s: 5.6.7.1-jira8, 5.6.14.1-p5
-
Fix Version/s: 6.17.0
-
Component/s: Built-in Scripts, Listeners
-
Labels:
-
Sprint:SR4J Sprint 89, SR4J Sprint 90
-
Critical Points:1.8
The "Send a custom email" listener script does not send new attachments if users add comments in quick succession and there is a delay in the "Condition and Configuration" script section
Steps to reproduce:
- Create a listener for the issue Commented event that has a sleep call in the "Condition and Configuration" section for 30 seconds
- Make the listener attach only new attachments with the radio button named "New" under the "Include attachments" section
- Add an attachment to an issue in a comment and wait for it to add the comment so you can then quickly add another comment with no attachment. You will get 2 emails but the attachment will be missing from the first email
- if you log out the isNew boolean in the MailAttachment closure it will be null for both emails where it should be true for the first email
I believe the delayed execution is causing the part of the listener that gets a list of new attachments to see the first comments attachment as not new by the time the attachment callback runs