SetValue in Wikipage -> Float Custom Field

Description
Salmolin
Posts: 14
Joined: Mon Sep 21, 2015 5:54 am

SetValue in Wikipage -> Float Custom Field

Postby Salmolin » Tue Mar 12, 2019 6:48 am

I'm not able to get a float value after some calculations.
This is the error displayed:

Error in document content.
Error number 4001 in 4: Error while parsing velocity page project/xxxxxx
Wrapped Exception: Invocation of method 'setValue' in class com.polarion.alm.tracker.internal.model.WorkItem threw exception class java.lang.IllegalArgumentException : 82280.00 is not instance of java.lang.Float


Code: Select all

#set($a = 0)
$transactionService.beginTx()
$wi.setValue("customField_floatType", $a) 
$wi.setValue("customField_floatType", $numberTool.format('#.00', $a)) 
$wi.save()
$transactionService.commitTx()


Any solution in this case?

Jürgen
Posts: 79
Joined: Tue Sep 12, 2017 1:02 pm

Re: SetValue in Wikipage -> Float Custom Field

Postby Jürgen » Tue Mar 12, 2019 12:57 pm

I don't have the time to investigate this further, but please check this page: https://stackoverflow.com/questions/33238646/velocity-numbertools-formatter


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 9 guests