Request: In the JSM automation rule for sending emails, the email body needs to display the value of a field from a form. If the field is empty, it should display "null"; otherwise, it should display the field value directly.
Below is a rule written using "if" or "#if", but the correct value is not displayed in the email body.
Could you tell me what's wrong? thanks. Both methods should display "ssds", but currently the IF statement returns null, and the #if statement returns empty.
for if statement: {{if(issue.customfield_12345, issue.customfield_12345, "null")}}
for #if statement:
{{#if(issue.customfield_12345)}}
{{issue.customfield_12345}}
{{else}}
null
{{/}}
Hey @Vina Wu ,
Instead of using if and #if statements, can you try using default value syntax to display "null" when the field is empty:
{{issue.customfield_12345|"null"}}
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.