I had written the below code to get attachment in the email and it is not working please let me know where is the mistake.
Hi {{issue.assignee.displayName}},
The following issue has attachment linkage:
{{issue.key}} - {{issue.summary}}
{{#issue.attachments}}
-[{{filename}}]({{URL}})
{{/issue.attachments}}
Learn more about this issue: {{issue.url}}
Regards,
Jira Automation
Hi @[deleted]
What is not working as you expect?
If you are not getting a URL to the attachment file, try using the {{content}} smart value instead. And consider that only recipients with a Jira user will be able to access that URL.
If you are expecting an image of the attachment file to appear in the email, that is not possible at this time with outgoing emails.
And for your iterator, I suggest simplifying to avoid having errors in your message. For example:
{{#issue.attachments}}
-[{{filename}}]({{content}})
{{/}}
Kind regards,
Bill
Hi Bill,
I need the attachments in the email for the assignee of the defects.
I had tried with the above one but unable to get it Can you please check and let us know if there is code to get the attachments in the email.
Thanks
Anjireddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not believe that is possible. The rule actions for emails do not send the attachment, and while there is a REST API function to get an attachment, but that cannot be used to send it in the rule's email action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Can you provide the code which we can get the URL of the attachment in the email.
URL is also fine for us please let us know.
Thanks
Anjireddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please see my first post in this thread, as it shows the {{content}} attribute of attachments, which provides a URL a licensed Jira user can access.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hi @Bill Sheboy
I had tried with the above code which you had provided but not received any content or the URL please let me know how to write this.
Thanks
Anjireddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please post an image of your complete rule (in one image), images of each action / condition / branch, and an image of the audit log details showing the rule execution. Those may provide context to explain what is happening.
Again regarding my first post: I tried that and it provided a URL which may be used to trigger a download, when used in an email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Please find the attached logs and content.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The audit log shows the cause of the symptom:
Your trigger is using JQL, and you have selected the option to not include issues which have not changed since the last run execution. And so there are no issues to process.
I recommend considering what you want to do: leave the rule as-is, or remove that option from the trigger.
And...The conditions in your rule could be removed and added to the trigger JQL with this:
AND assignee IS NOT EMPTY AND attachments IS NOT EMPTY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
Thanks for the update it worked and we got the links in the email but we are unable to open that links getting the below error.
Thanks
Anjireddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Only people with Jira access (and access to the specific issues) will be able to view those attachments using the link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
I had the access to the Jira and for the issue as well.
Thanks
Anjireddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just re-tested this for an issue that I have access to, and was correctly prompted to download the attachment.
If you go to the specific Jira issue for that attachment:
If you can, I suggest working with your Jira site admin to submit a ticket to Atlassian Support here: https://support.atlassian.com/contact/#/ They may see something in their internal logging to explain this permissions issue.
When you hear back from them, please post what you learn to benefit the community.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.