The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Confiform and Velocity Question

Stuart Wosika
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 5, 2024

Hi guys,

 

I want to check a value is >= (greater than or equals to).  Below is an example.  

I get errors If I do this.  The only operator I seem to be able to get to qork is == ( is equals to).

I read the Velocity documentation that says I can do this.  

Can someone help please?

BR.

Stuart.

 

#set ($vasSize = "[entry.asSize]")


{
	#if ( $vasSize >= 0 ) 
   "update":
	{
		"issuelinks": [
    	{
			"add":
			{
				"type":
				{
					"name":"Relates",
					"inward":"relates to",
					"outward":"relates to"
				},
				"outwardIssue":
				{
                          "key":"[entry.idea1]"
                }
			}
		}
       ]
	}
	#end
}

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
January 7, 2024

Hi

Well, if you set the variable as text... 

#set ($vasSize = "[entry.asSize]")

It is a bit too much to expect it act as a numeric in >= conditions

Alex

Stuart Wosika
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 8, 2024

Hi Alex,

 

sorry are you saying that if the variable is text rather than numeric then >= or <= works?

 

BR.

 

Stuart.

Alex Medved _ConfiForms_
Community Champion
January 9, 2024

Please refer to Velocity templating documentation for more details

This defines a text variable

#set ($vasSize = "[entry.asSize]")

But this defines a numeric variable

#set ($vasSize = [entry.asSize])

Alex

Stuart Wosika
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 9, 2024

Hi Alex, thankyou for your patience and your support.  Silly mistake.  Now everything is working correctly. Regards. Stuart.

TAGS
AUG Leaders

Atlassian Community Events