I am trying to create an automation that sends the Assignee a notification email when a new attachment is added to their issue. This should trigger when an attachment is added to the issue directly, and when an attachment is added to a comment on the issue.
If it an attachment to the issue, the email should read: "For {{link to issue.id}}, {{John Doe}} added the attachment {{FileName.extension}}"
If it is a comment, the email should read: "For {{link to issue.id}}, {{John Doe}} commented with the attachment {{FileName.extension}}"
I've tried searching for this but all the results I got were of people wanting to send the actual attachment via email. I only want to send the name of the attachment and a link to the issue.
Did you try this with the Issue Commented trigger? When I did that, I saw the name of the attached file in the comment body. Perhaps try writing that to the log to see the format of the name for your use, as it could be parsed out using text functions or a regular expression.
Kind regards,
Bill
Managed to figure out the first part:
When value changes for Attachment:
For <a href="{{issue.url}}">{{issue.key}} - {{issue.summary}}</a>, {{initiator.displayName}} added the attachment {{attachment.filename.last}}.
Still trying to figure out the comment part, specifically how to detect when an attachment is added to a comment.
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.