Hello,
I try to use the conditional
"ram_size": "{{#if(equals(\"issue.fields.vm_family\", \"linux\"))}}{{ issue.fields.vm_resource_memoire }}{{/}}{{#if(not(equals(\"issue.fields.vm_family\", \"linux\")))}}{{issue.fields.vm_resource_memoire_win}}{{/}}"
But its not working.
I want when issue.fields.vm_family is windows the value was
issue.fields.vm_resource_memoire_win but it's empty
I want when the value of the variable issue.fields.vm_family is linux that it returns me the correct value otherwise it sends me the other value
Hi @Baba Gadji -- Welcome to the Atlassian Community!
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
The format of the conditional expression with an else clause does not use the pound # sign:
{{if(smartValue, "value if true", "value if false")}}
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/
Also note there is no need to escape quotation marks unless they are part of the search expression.
When you want to use a quoted expression within a JSON expression, you may use the JSON functions to help: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.