-
Suggestion
-
Resolution: Unresolved
-
-
Jira Software, Jira Service Management, Jira Work Management, Jira Product Discovery
Issue description
Currently, it is not possible to include an issue attachment using the Send Email action in an automation rule.
Example 1
- Let's assume that an automation rule was configured to use the Send Email action and use the following smart value in the content of the email:
{{issue.comments.last.body}
- If a comment is added to a ticket including an attachment as shown below:
- The generated email will include the text from the comment, but it will not render/include the attachment. Instead, a reference to the attachment will be included:
!attachment.jpg|thumbnail!
Example 2
- Let's assume that an automation rule was configured to use the Send Email action and use the following smart value in the content of the email:
Issue attachment: {{issue.attachment}}
- If the rule is triggered and the email is sent, the email will contain the attachment metadata (including its link), but not the actual attachment file:
AttachmentBean{self='http://localhost:8081/jira8201/rest/api/2/attachment/11400', id=11400, filename='LocalTest_IssueCreatedFromCreateButton.png', author=UserBean{name='julien', key='JIRAUSER10000', accountId='null', emailAddress='someaddress@test.com', displayName='Julien Rey', active=true, timeZone='Europe/Helsinki', locale='null'}, created=Tue Jul 11 14:08:01 CEST 2023, size=229915, mimeType='image/png', content='http://localhost:8081/jira8201/secure/attachment/11400/someimage.png'}
Suggestion
Add the ability to include issue attachment when using the Send Email action
Workaround
As a workaround, we may include publicly available images on the emails using the <img src=> tag:
Hi,
<img src="https://publicly-accessible-site.com/logo.png">
Cheers
Another Workaround
Currently a possible workaround would be follow the suggestion found on this Community post so you can send URLs of the attachments contained in the issue.
So this email body will iterate over all attachments on an issue and produce links that allow recipients to download the attachment directly from JIRA:
<ul>
{{#issue.attachment}}
<li><a href="{{content}}">{{filename}}</a></li>
{{/issue.attachment}}
</ul>
- is cloned from
-
JIRAAUTOSERVER-338 Ability to send a ticket attachment using Send Mail function
- Gathering Interest
- is duplicated by
-
AUTO-1429 Content section in Send Email for Automation rule should allow to add image attachment
- Closed
- relates to
-
AUTO-1586 Support for attachments in automation notifications and emails
- Gathering Interest