Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×I have a custom field called "p-card: missing receipts". It's a long text field and its ID is 29301.
I want automation to send an email. If there is a value in that custom field, I want "hello" displayed in the email, otherwise nothing.
I have tried the following but they either display nothing when there is a value in the custom field, or they throw an error:
{{if(not(customfield_29301.isEmpty)),"hello")}}
{{if(p-card: missing receipts,"hello")}}
{{if(customfield_29301)}}hello{{/}}
I used the following documentation: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/
Sebastian -
Thank you.
1. After much experimenting, I determined the problem: a single-line conditional statement must begin with #if, not if. This statement works:
{{#if(not(issue.customfield_29301.isEmpty))}}hello{{/}}
Remove the # and this statement throws an error:
{{if(not(issue.customfield_29301.isEmpty))}}hello{{/}}
It would appear that this documentation is incorrect: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/
2. My experiments indicate that "issue." has no effect in this situation. All of these worked fine:
Thanks again
Lionel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should use:
- issue.customfield_29301 instead of customfield_29301
- issue.p-card: missing receipts
Please check this doc - https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#Available-properties.1
Regards,
Seba
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.