-
Suggestion
-
Resolution: Unresolved
Current behavior:
The smart value {{attachment.id}} fetches attachments' IDs in alphabetical order and not by the latest (or last attachment) that was added.
Consider a scenario where 3 attachments are added to the issue:
- "1_2025-01-09T13_21_16.962Z.png"
- "asset object.jpg"
- "zeeattach.png"
When you print {{attachment.last.id}} smart value using 'Log action' in an Automation rule with 'Issue commented' trigger, it will give the ID of the "zeeattach.png" and {{attachment.first.id}} will give the ID of "1_2025-01-09T13_21_16.962Z.png".
Expected behavior:
The smart values {{attachment.last.id}} and {{attachment.first.id}} should fetch the attachment IDs according to the date and time they were added to the issue.
Greetings!
In my opinion, making changes to the behavior of attachment list ordering without a holistic investigation and change to list ordering seems like a very bad idea, potentially breaking many customers' existing rules.
There is nothing in the documentation defining list order, and it can only be (possibly) relied upon for the Lookup Issues action with JQL containing an ORDER BY clause. All other references do not have list order information:
For the scenario described in this suggestion, there are two possible workarounds:
Kind regards,
Bill