I was trying to do the following, but nothing would show up in my Jira description:
#set( $range= $convert.toInteger("[entry.numOfActions.id]") )
#foreach($i in [1..$range])
#set($add = "[entry.actionType${i}]")
#set($sendAway = "$sendAway$add")
#end
"description": "$sendAway"
entry.numOfAction.id return 1,2,3,4 etc...
This is suppose to get the value from the field which end with different number 1 through 6 and append then into my description.
I was just wondering if it possible to do this on confiforms or is it not supported?
Also this is inside my overall Jira IFTTT oncreated request.
Thanks :)
In ConfiForms the template you give is first evaluated for "[entry.field_name]" expressions, finding the values for expressions you have
And then, attempting to evaluate it as a Velocity Template
So, having something like [entry.actionType${i}] will never work, as well as using "$convert" (which is not something you have available in the Velocity context)
Alex
okay, Thanks!
If I do something like:
#($var = "entry.actionType$i")
#($add = "[$var]")
will this also not work because of the fact that it's evaluated first even though "entry." doesn't exist?
EDIT: I tried it out and it does not work, but if there a work around by any chance or am I out of luck?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Of course it will not work as explained before (why) - there is no such thing as entry.actionType$i when [entry.field_name] expressions get processed
I am actually not sure what is the end result you want to achieve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am trying to make a range for loop that will access all of my fields because the only difference between all my fields is that the number at the end is different. So I wanted to dynamically change the last number before trying to access the fields and just do everything I need to do in that 1 for loop. If that doesn't make sense let me know and I can give an example.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What you are trying to do will not work this way.
As explained earlier the expressions are evaluated BEFORE the template gets processed as Velocity template
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.