Smart value conditions

Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 6, 2025

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

1 answer

0 votes
Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2025

@Sebastian Krzewiński 

Can you share the screen shot of the automation esp. where you are setting attachmentName?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events