I am using the below IF/ELSE statements in confiforms for creating JIRA item and getting an error message as cannot prepare JSON.
Only IF statements are working fine (instead of using Else). can someone help with me with the correct syntax for IF ELSE here?
{
"fields":
{
"project":
{
"key": "CBCCR"
},
"summary": "[entry.summary.escapeJSON]",
"issuetype":
{
"name": "Story"
},
"priority":
{
"name": "TBP"
},
#if ([entry.FunctionalArea.escapeJSON]== 1)
#if ([entry.ApplicationArea.escapeJSON]== 1)
"labels": ["TEST1"]
#else if ([entry.ApplicationArea.escapeJSON]== 2)
"labels": ["TEST2"]
#else if ([entry.ApplicationArea.escapeJSON]== 3)
"labels": ["TEST3"]
#else if ([entry.ApplicationArea.escapeJSON]== 4)
"labels": ["TEST4"]
#end
#end
}
} |
|
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.