Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,362,610
Community Members
 
Community Events
168
Community Groups

Iterate through all attachments of issue - Jira Cloud Automation

I have a requirement to audit all attachments and their size for each issue in a particular project (this is in Jira Cloud). Based on this page: Jira smart values - issues | Cloud automation Cloud | Atlassian Support

....it's possible for me to use the smart values such as {{attachment.first.size}} and {{attachment.last.size}} but how do I access the values in between incase of an attachment list longer than 2? I initially tried using the Advanced branching with the smart value {{attachment}}, which pulls the entire list of attachments,. In troubleshooting, I've setup a rule, which should iterate through all of the attachments, but this does not work for attachment size - it only shows one value, for an issue that has 67 attachments. Has anyone else encountered this?

automation1.png

 

automation2.png

 

1 answer

0 votes
Sam Harding Atlassian Team Aug 15, 2022

Hi @James Paniagua ,

 

Looking at the rule you have set up there, it seems that you are branching on `{{attachment}}`, and creating a variable `{{AttachmentItem}}` for your branches. However, the log action is referencing the original `{{attachment}}` and not the `{{AttachmentItem}}`. Can you try changing the actions in the branch to use `{{AttachmentItem.size}}` etc and see if it reflects the correct data?

Cheers
Sam

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events