Hi
Is it possible to get name or id of last added attachment to issue using smart values?
I tried issue.attachment.id.last but it get last item from attachments list.
Regards,
Sebastian
I'm not sure if this helps you exactly but if you use the smart value: {{attachment.created}}, it will give you a comma separated list of the creation date of all the attachments on an issue.
Hi @Michael March
Thanks for tip but this is not what I need.
I need to get last added attachment. Dates are ok but I can't work in automation and search attachments based on creation date.
Seba
Hello
It is possible to use the smart value {{issue.attachment.last.id}}.
However, I find it very unreliable and inconsistent and it often does NOT report the last Id.
You should experiment with that - how is it different from what you tried at first?
Hi @Stuart__
*.first or *.last return first/last item from attachment list. In many cases last attachment on list isn't last added attachment.
I fixed this by using script runner in automation for jira. This gave me attachments list which I was able to use in automation.
I've got a similar requirement. My solution was to create an automation with a Field value changed trigger monitoring 'Value added' for 'Attachment'. I use the smart value {{addedfieldChange.valueIds}} to get the id of the added attachment.
This was sufficient for my use case (notifying an external app when a file was attached). I suppose you could trigger an update to a custom Jira field to track the last added attachment?
It looks like you're new here. Sign in or register to get started.