Currently working on an automation where I am trying to work with conditional logic on custom fields. The conditional logic works when ever I use system fields.
For example - {{#=}} {{#issue.subtasks}} {{#if(equals(issuetype.name,"Approval"))}} {{fields.customfield_xxxxx}} + {{fields.customfield_xxxxx}} + {{/}} {{/}} 0 {{/}}
However, when I try to use the same logic on customfields, it doesn't work
Example - {{#issue.subtasks}} {{#if(equals(fields.customfield_xxxxx,"String"))}} {{fields.customfield_xxxxx}} {{/}} {{/}}
Please do let me know your thoughts
Hello @Sidney Joshua Ambrose
In this below syntax:
{{#issue.subtasks}} {{#if(equals(fields.customfield_xxxxx,"String"))}} {{fields.customfield_xxxxx}} {{/}} {{/}}
What kind of field is this custom field?
Cause if its single select check box, drop down, you may have to use customfield_xxxxx.value..
If its multi select field field, then, even if you use customfield_xxxxx.value, it will provide a list and you cannot compare it to a value, you need to use "match" function instead..
So, need details on this field for us to tell if you can tweak your current syntax or you need a different way to do you check.
Thanks!
Thank you so much for the help. It was a drop down and I used "customfield.value" and it worked.
Regards,
Sidney
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.