Hello everyone,
I hope everyone is happily debugging/coding. Just as the title states, I am having an issue where my Jira automation that has a Then: Send web request will randomly grab the incorrect attachment where it's manually being triggered. This is currently my custom data that I wish to send.
{
"tmp": "{{issue.attachment.last.content}}",
}
In some instances, my ticket will grab the latest attachment while in some tickets will not. I've checked the time stamps to make sure that they have different CSVs data, but I can see that if there were 3 CSVs, my automation would grab the CSV second from the last attachment. Any help in the right direction would be most appreciated!
Thank you
Hello @Edward Yun
{{attachment}} smart value gives you the full list of attachments sorted by Alphabetical order, not by date, so thats what you are seeing.
Only if you are using a trigger = "Field value changed" on Attachments, you can, in a hacky way, recreate the file content/URL like below: {{baseUrl}}/{{changelog.Attachment.to}}/{{changelog.Attachment.toString}}
But because you are using Manual trigger, I dont know of a way to get that info. Sorry and hope it helps. Thanks!
Hi, Kalyan Sattaluri
This is perfect. I had no idea that it was based on alphabetical order and not by the dates. I have a possible solution based on what you have just explained for me.
I appreciate the assistance and can't thank you enough for your insights.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to hear it was useful. Please consider accepting solution if it answers your question so others can benefit, Thanks!
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.