Forums

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

Conditions in Confiforms IFTTT Macro

Caroline Busse May 7, 2018

Hi,

I am working with different projects in JIRA. And only one includes components which I want to push into JIRA.

My form works like this:

- first I select the corresponding project

- then another dropdown appears with the corresponding project (= the field "component")

 

Therefore I would like to have a condiiton which only sets the component field in my created JIRA issue, if a component is selected in the component dropdown.

 

Unfortunately, none of my conditions work:

 

code2.PNG

 

 

code.PNG

 

It would be really nice if someone would help me.

Thanks. :)

2 answers

1 vote
Alex Medved _ConfiForms_
Community Champion
June 28, 2018

Please see this page on how to check for nulls in Velocity templates: https://wiki.apache.org/velocity/CheckingForNull

With ConfiForms, the values for fields are also available in the Velocity context via direct names, like 

${component}

in your case. Which means you can do the following

#if(${component})
"components": [{"name":"[entry.component.label]"}]
#end
Cameron Eldridge
Contributor
January 2, 2019 edited

Here's the JSON to support multiple component values:

"components": [[entry.Components.transform(label).asArrayOfKVPairs(name)]]

 

Best,

Cameron

0 votes
Caroline Busse May 8, 2018

in the first case it should be *ifnotnull*

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events