Uploaded image for project: 'Jira Software Cloud'
  1. Jira Software Cloud
  2. JSWCLOUD-22660

Links to files/images in comments are broken while sending email using Automation

    XMLWordPrintable

Details

    • 1
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Issue Summary

      Links to files/images in comments are broken while sending an email using Automation

      Steps to Reproduce

      1. Create an automation rule that is triggered when a comment is added
      2. Add an action that sends an email with the comment like
        {{#issue.comments.reverse}}
            {{body.html}}
        {{/}}
        
      1. Save the rule and add a comment on a ticket with an image.

      Expected Results

      The comments are sent over along with attachments.

      Actual Results

      The links are invalid and users can't access the attachment via email. Right below follows an example of the link that is sent via email:

      img src="/secure/attachment/ID/NAME
      

      Workaround

      We can use the following regex to exclude images from the comment:

      {{#issue.comments.reverse}}  
         {{body.replaceAll("![^\s!][^!]+[^\s!]+[!]", " ")}} 
      {{/}}
      

      ps. If we use the regex above we can't convert the comment from Wiki to HTML.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tbehm@atlassian.com Thiago Behm.
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: