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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

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
AUG Leaders

Atlassian Community Events