← Back to team overview

dhis2-devs team mailing list archive

[Bug 745473] Re: validation-rules-NULL-operands

 

The first place I looked for a way around this situation was an IFNULL
or IFZERO button on the line below the box where ()*/+-D are shown. I
don't know if this is just me (due to SQL exposure perhaps) or if other
users would have the same inclination. The plus of having it here
instead of a tick box for the whole expression would be the ability to
specify for each element.

For example:
IFNULL(DataElement1,0) + IFNULL(DataElement2,0) + IFNULL(DataElement3,NULL)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/745473

Title:
  validation-rules-NULL-operands

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  I defined a validation rule.. RDT positive cases <= RDT tested cases.
  When the user enters a zero or a blank for the RHS and a value for the
  LHS, the validation rule is passed, which in fact should not be the
  case. Setting the data elements to "Store significant zeroes" solves
  the problem when users enter a zero for the RHS, but it does not solve
  the problem when they leave the field blank.

  I think one possible fix would be that if the value is NULL then it
  should be treated as a zero. This seems to be more or less the
  behaviour elsewhere in DHIS 2.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/745473/+subscriptions


References