Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-79052

Jira attaches icons to notification emails regardless of whether they're used in the email template

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 8.0.0, 10.3.9, 11.0.0
    • Email notifications
    • None

      Issue Summary

      When Jira sends email notifications, it includes icons even though they're not used in the relevant email notification template. This causes some email systems to treat the extra icons as attachments rather than inline images, which can result in notification emails being incorrectly blocked by security policies.

      Steps to Reproduce

      1. Configure outgoing email in Jira.
      2. Disable email notification batching.
      3. Update an existing work log.

      Expected Results

      Jira should send an email notification, attaching only those icons which are used in the template.

      Actual Results

      Jira attaches the issue type icon even though it's not used in the template for work log update notifications. We can see that GMail treats the issue type icon as an attachment, even though it's an inline image:

      Workaround

      We can work around the problem by adding the issue type icon to the affected notification template. For example, in the case of work log updates:

      1. Log in as a user with the Jira System Administrators global permission.
      2. Navigate to Administration (⚙) > System > Mail > Email templates.
      3. Select Download .zip to download a ZIP archive with your email templates.
      4. Unzip the archive, then edit the file email/html/issueworklogupdated.vm.
      5. Add the following line to the end of the file:
        #renderIssueTypeIcon(${issueType})
        

        After editing, the contents of issueworklogupdated.vm should look like this:

        #disable_html_escaping()
        
        #set ($worklogUpdated = true)
        #genericChangelogMailWithWorklog("email.event.activity.worklog.updated.on.issue")
        #renderIssueTypeIcon(${issueType})
        
      6. Save the issueworklogupdated.vm file and zip up the entire template directory again, making sure to keep the same .zip file structure as the original archive.
      7. Select Upload .zip and upload the modified template ZIP file.
      8. Wait 5 minutes to ensure the template changes have been applied.

      This workaround will result in a small issue type icon appearing at the bottom of the notification, but GMail will no longer show it as an attachment:

        1. Issue type icon shown as attachment.png
          46 kB
          Marcus Fong
        2. Notification after workaround.png
          40 kB
          Marcus Fong

              Unassigned Unassigned
              8379abf86dad Marcus Fong
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: