Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confiform - Action to create Jira ticket - Using #if #end

G A February 17, 2023

Context - On submit of Coniform, an automated Jira ticket is getting created.

In the confiform, I have a drop down field named 'ProductSelection'

What I am trying to achieve:

I am trying to assign a specific value to the 'labels field in Jira based on the below condition

Condition:

If the ProductSelection.label = "Beacon"

then I have to assign a value to the 'labels' in Jira

Otherwise I will not pass any value for 'labels' field

Inside IFTTT, I used the below code

#if(${entry.ProductSelection.hasLabel("Beacon")})

"labels" : ["[entry.ProductSelection.escapeJSON]"]

#end

However it doesn't work. Not getting error also. It is not entering the If condition

What change is required here?

 

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2023

Hi @G A  and welcome to this community

You cannot mix [entry.field_name] notations inside the Velocity templates conditions

See https://wiki.vertuna.com/display/CONFIFORMS/Configuring+ConfiForms+IFTTT+actions+and+rules#ConfiguringConfiFormsIFTTTactionsandrules-CreateJiraIssue

If your ProductSelection field is just a dropdown then it should be as simple as checking label value

#if(${ProductSelection.label} == 'Beacon')

"labels" : ["[entry.ProductSelection.escapeJSON]"],

#end

Alex 

G A February 17, 2023

It worked perfectly. Thank you Alex.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events