Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-4221

The "Send a custom email" listener script does not send new attachments if users add comments in quick succession

    XMLWordPrintableJSON

Details

    • SR4J Sprint 89, SR4J Sprint 90
    • 1.8

    Description

      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:

      1. Create a listener for the issue Commented event that has a sleep call in the "Condition and Configuration" section for 30 seconds
      2. Make the listener attach only new attachments with the radio button named "New" under the "Include attachments" section
      3. 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
      4. 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

       

       

      Attachments

        Activity

          People

            twozniak Tomasz Wozniak [X] (Inactive)
            mclark Matthew Clark
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: