← Back to team overview

dhis2-devs team mailing list archive

Re: Programme validation rule exception with decimals

 

Hi Jason,

We haven't support the program validation rule with multi data elements or
something like 0+3+6+6+0+0 yet. Just supported with one data element for
one side ( one data element for left side/right side ).


Best regards,
------------------------------------------------
Châu Thu Trân
HISP Viet Nam
Email: tran.hispvietnam@xxxxxxxxx


On Tue, Jun 24, 2014 at 9:45 PM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:

> Hi Tran,
> Thanks for this, but I think it is only a partial fix. Now the problem is
> that we have some data elements which needed to be added together and
> compared to other ones, similar to the aggregate validation rules, but this
> is event data. The error we get now is..
>
> * ERROR 2014-06-24 09:34:47,979 Error while executing action
> (ExceptionInterceptor.java [http-apr-8080-exec-7])
> java.lang.NumberFormatException: For input string: "0+3+6+6+0+0"
>          at
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>         at java.lang.Integer.parseInt(Integer.java:492)
>         at java.lang.Integer.parseInt(Integer.java:527)
>         at
> org.hisp.dhis.program.DefaultProgramValidationService.validate(DefaultProgramValidationService.java:177)
>         at sun.reflect.GeneratedMethodAccessor1771.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>
> Looks like the formula is not being parsed?
>
> Best regards,
> Jason
>
>
> On Tue, Jun 24, 2014 at 3:16 PM, Tran Chau <tran.hispvietnam@xxxxxxxxx>
> wrote:
>
>> Thank you for reporting this bug. It is fixed in revision 15171.
>>
>> Best regards,
>> ------------------------------------------------
>> Châu Thu Trân
>> HISP Viet Nam
>> Email: tran.hispvietnam@xxxxxxxxx
>>
>>
>> On Tue, Jun 24, 2014 at 7:13 PM, Jason Pickering <
>> jason.p.pickering@xxxxxxxxx> wrote:
>>
>>> Seems from this (https://bugs.launchpad.net/dhis2/+bug/1251718) it may
>>> have been fixed in 15169 but
>>>
>>> int leftSide = Integer.parseInt( leftSideValue );
>>> int rightSide = Integer.parseInt( rightSideValue );
>>>
>>> would seem to indicate the problem with decimal values.
>>>
>>>
>>>
>>>
>>> On Tue, Jun 24, 2014 at 1:08 PM, Jason Pickering <
>>> jason.p.pickering@xxxxxxxxx> wrote:
>>>
>>>> Not sure if this has already been reported, but thought just in case
>>>> not.
>>>> We have defined a programme validation rule which states that the
>>>> height of a client (in meters) should be less than 2.5. However ,we get
>>>> this exception
>>>>
>>>>
>>>> * ERROR 2014-06-24 07:02:24,750 Error while executing action
>>>> (ExceptionInterceptor.java [http-apr-8080-exec-5])
>>>> java.lang.NumberFormatException: For input string: "2.6"         at
>>>> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>>>>       at java.lang.Integer.parseInt(Integer.java:492)        at
>>>> java.lang.Integer.parseInt(Integer.java:527)         at
>>>> org.hisp.dhis.program.DefaultProgramValidationService.validate(DefaultProgramValidationService.java:176)
>>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>       at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>       at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>       at java.lang.reflect.Method.invoke(Method.java:606)
>>>>
>>>> Version:2.15Build revision:15170
>>>> Regards, Jason
>>>>
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>

Follow ups

References