← Back to team overview

dhis2-devs team mailing list archive

[Bug 1192962] [NEW] Validation rules not working with constants

 

Public bug reported:

Tried to make a validation rule that checks if a value is larger than 0.

The data element I wanted to use has several categories, so I added all
in the "left side" expression, unchecking the "skip for missing values"
box (which by the way should be given a better name - is it skipping the
rule, or the missing values?). As the right side expression i added 0.
The rules does trigger a validation error, neither when filling only
some categories, or all.

Edit the formula, to have only of of the categories. Still does not
trigger a violation.

Finally tried to add the data element, without any categories (ie the
"total"). It is not clear is this is supposed to be supported, since the
"total" is not shown in the data element selection list when creating
the expression, as opposed to when making indicators. Using the total,
the validation rule is triggered, however, the "Left side" column in the
pop-up window always displays 0.0, no matter what value has been
entered.

Same issue on 2.10 and 2.12

** Affects: dhis2
     Importance: Undecided
         Status: New

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

Title:
  Validation rules not working with constants

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  Tried to make a validation rule that checks if a value is larger than
  0.

  The data element I wanted to use has several categories, so I added
  all in the "left side" expression, unchecking the "skip for missing
  values" box (which by the way should be given a better name - is it
  skipping the rule, or the missing values?). As the right side
  expression i added 0. The rules does trigger a validation error,
  neither when filling only some categories, or all.

  Edit the formula, to have only of of the categories. Still does not
  trigger a violation.

  Finally tried to add the data element, without any categories (ie the
  "total"). It is not clear is this is supposed to be supported, since
  the "total" is not shown in the data element selection list when
  creating the expression, as opposed to when making indicators. Using
  the total, the validation rule is triggered, however, the "Left side"
  column in the pop-up window always displays 0.0, no matter what value
  has been entered.

  Same issue on 2.10 and 2.12

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


Follow ups

References