I am trying to not send a select list (cascading) custom field when the user doesn't select any of the options. Using the instructions in https://wiki.vertuna.com/display/CONFIFORMS/Conditional+statements+in+IFTTT+macro+body
I have placed a conditional statement in my body however it is throwing the error.
Could not prepare JSON: '{ "fields": { "project": {"key": "PSNSPLAY"}, "issuetype": {"name": "Improvement"}, "summary": "Sending with no Department & Division selected CONDITIONS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", "customfield_13062": {"id":}, }, }'. Invalid format. Missing value at 242 [character 33 line 6] Used JSON: '{ "fields": { "project": {"key": "PSNSPLAY"}, "issuetype": {"name": "Improvement"}, "summary": "Sending with no Department & Division selected CONDITIONS!", "customfield_13062": {"id":}, }, }'
This is what is in the macro body. It seems so simple so what am I missing here?
{
"fields": {
"project": {"key": "PSNSPLAY"},
"issuetype": {"name": "Improvement"},
"summary": "Sending with no Department & Division selected using CONDITIONS!",
#set ($dep = "[entry.smartdepart]")
#if ($dep)
"customfield_13062": {"id":[entry.smartdepart.ID]},
#end
},
}
Your IF statement
#set ($dep = "[entry.smartdepart]")
#if ($dep)
"customfield_13062": {"id":[entry.smartdepart.ID]},
#end
is always true. As you check if there is a $dep variable
Take a look at Velocity documentation https://cwiki.apache.org/confluence/display/VELOCITY/CheckingForNull on this
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.