For the life of me I cannot figure out why this is not working: When posting to JIRA I have this:
"labels": ["WOF-Intake"], and it works as expected.
THe issue I have is that I have several choices (6) and I want a different label depending on choice:
#if(${ProductFamily.id} =='01')
"labels": ["FC-Prevent","WOF-Intake"],
#end
#if(${ProductFamily.id} =='02')
"labels": ["FC-Detect","WOF-Intake"],
#end
#if(${ProductFamily.id} =='03')
"labels": ["FC-Response","WOF-Intake"],
#end
#if(${ProductFamily.id} =='04')
"labels": ["FC-Performance","WOF-Intake"],
#end
#if(${ProductFamily.id} =='05')
"labels": ["FC-Prevent-CIAM","WOF-Intake"],
#end
#if(${ProductFamily.id} =='06')
"labels": ["FC-Integration","WOF-Intake"],
#end
I have a Multiselect field called ProductFamily with the following options:
Id | label |
01 | Fin Crimes Prevent |
02 | Fin Crimes Detect |
03 | Fin Crimes Response |
04 | Fin Crimes Performance |
05 | Fin Crimes Prevent - CIAM |
06 | Fin Crimes Integration |
Hi
see how values in multi-value fields could be checked in velocity https://wiki.vertuna.com/display/CONFIFORMS/IFTTT+macro+body+evaluates+as+Velocity+template
Alex
THanks Alex!
THis "almost" worked. I now have this:
#if(${ProductFamily.hasId("01")})
"labels": ["FC-Prevent","WOF-Intake"]
#end
#if(${ProductFamily.hasId("02")})
"labels": ["FC-Detect","WOF-Intake"],
#end
#if(${ProductFamily.hasId("03")})
"labels": ["FC-Response","WOF-Intake"],
#end
#if(${ProductFamily.hasId("04")})
"labels": ["FC-Performance","WOF-Intake"],
#end
#if(${ProductFamily.hasId("05")})
"labels": ["FC-Prevent-CIAM","WOF-Intake"],
#end
#if(${ProductFamily.hasId("06")})
"labels": ["FC-Integration","WOF-Intake"],
#end
The issue being that if multiple ProductFamily's are selected in the multi-select I run into a duplicate field "labels" issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I should be able to do this with multiple IFTTT's saying to update jira but wondering if there is a simpler solution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is a Velocity templating - you definitely can do more in a template :-)
For example
#set($labels = []) #set($added = $labels.add("WOF-Intake")) #if(${ProductFamily.hasId("01")}) #set($added = ${labels.add("FC-Prevent")}) #end #if(${ProductFamily.hasId("02")}) #set($added = ${labels.add("FC-Detect")}) #end #if(${ProductFamily.hasId("03")}) #set($added = ${labels.add("FC-Response")}) #end #if(${ProductFamily.hasId("04")}) #set($added = ${labels.add("FC-Performance")}) #end #if(${ProductFamily.hasId("05")}) #set($added = ${labels.add("FC-Prevent-CIAM")}) #end #if(${ProductFamily.hasId("06")}) #set($added = ${labels.add("FC-Integration")}) #end "labels": [#foreach( $lab in $labels ) #if($velocityCount > 1),#end "${lab}" #end],
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks as always Alex. THis solution worked. I guess I need to learn Velocity to continue with my Confiforms skill, but as always i thank you for your solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not for ConfiForms… mainly for ConfiForms to Jira integration and the effective usage of offered tools :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.