Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with IF/ELSE code

Vikas Garg
February 11, 2019

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
    }
}

1 answer

0 votes
Vsevolod Romanchenko
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 16, 2023

Did you find solution?

Suggest an answer

Log in or Sign up to answer