Hi!
I used smart values to list all attachments in ticket:
{{#issue.attachment}}"id":"{{id}}","filename":"{{filename}}"{{^last}},{{/}}{{/}}
and this is working perfect.
Now I created new variable in rule to get an attachment that is added in comment (Field value changed trigger is not working for this case - ttps://jira.atlassian.com/browse/AUTO-382). I'm able to get file name.
What I want to do now is to filter attachment details based on name from my smart value by using condition (https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#equals). My smart value query looks like below:
{{#issue.attachment}}{{#if(equals(attachmentName, filename))}}"id":"{{id}}","filename":"{{filename}}"{{/}}{{^last}},{{/}}{{/}}
where attachmentName is my variable. It occur that my variable is not readable inside {{#issue.attachment}}.
Is there any way that my idea will work? Maybe you can show me other way to achieve this?
Regards,
Seba