Program rule doesn't apply if error displayed next to a data element

Hi,

I’ve been facing a strange behavior and I wanted to know if there was a logic explanation to it.

I’ve set a program rule really simple (#{data_element} >10) associated with an error message. The program rule applies on a program which uses custom forms.

When I set the error message to be displayed next to the erroneous data element, DHIS2 simply ignores the program rule and I can validate the form whatever the answer I gave.

When I doesn’t set it to be displayed somewhere in particular (e.g. leave the fields blank), then the program rule is applied and an erroneous answer blocks me from validating the form.

Is there any reason for DHIS2 to ignore the program rule in the first case?

Thanks in advance :slight_smile:

Thomas

···


Thomas Warichet

www.bluesquarehub.com

Hello Thomas,

Which version of DHIS2 are you using?

Regards

···

On Wed, Jul 25, 2018, 1:38 PM Thomas Warichet twarichet@bluesquarehub.com wrote:

Hi,

I’ve been facing a strange behavior and I wanted to know if there was a logic explanation to it.

I’ve set a program rule really simple (#{data_element} >10) associated with an error message. The program rule applies on a program which uses custom forms.

When I set the error message to be displayed next to the erroneous data element, DHIS2 simply ignores the program rule and I can validate the form whatever the answer I gave.

When I doesn’t set it to be displayed somewhere in particular (e.g. leave the fields blank), then the program rule is applied and an erroneous answer blocks me from validating the form.

Is there any reason for DHIS2 to ignore the program rule in the first case?

Thanks in advance :slight_smile:

Thomas

Thomas Warichet

www.bluesquarehub.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Sorry… DHIS2 2.29

···

On Wed, Jul 25, 2018 at 3:04 PM, Barnabas Akumba akumbabarns@gmail.com wrote:

Hello Thomas,

Which version of DHIS2 are you using?

Regards

On Wed, Jul 25, 2018, 1:38 PM Thomas Warichet twarichet@bluesquarehub.com wrote:

Hi,

I’ve been facing a strange behavior and I wanted to know if there was a logic explanation to it.

I’ve set a program rule really simple (#{data_element} >10) associated with an error message. The program rule applies on a program which uses custom forms.

When I set the error message to be displayed next to the erroneous data element, DHIS2 simply ignores the program rule and I can validate the form whatever the answer I gave.

When I doesn’t set it to be displayed somewhere in particular (e.g. leave the fields blank), then the program rule is applied and an erroneous answer blocks me from validating the form.

Is there any reason for DHIS2 to ignore the program rule in the first case?

Thanks in advance :slight_smile:

Thomas


Thomas Warichet

www.bluesquarehub.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Thomas Warichet

DHIS2 Expert

Mobile: +32 486 48 30 60
www.bluesquarehub.com

Hello Thomas,

I have tried to reproduce the issue on my instance (version 2.29, Build 2018-07-18 06:48) but all is working fine.

Could you update your war file, clear your cache and try again?

Regards

···


Thomas Warichet

DHIS2 Expert

Mobile: +32 486 48 30 60
www.bluesquarehub.com

On Wed, Jul 25, 2018 at 3:04 PM, Barnabas Akumba akumbabarns@gmail.com wrote:

Hello Thomas,

Which version of DHIS2 are you using?

Regards

On Wed, Jul 25, 2018, 1:38 PM Thomas Warichet twarichet@bluesquarehub.com wrote:

Hi,

I’ve been facing a strange behavior and I wanted to know if there was a logic explanation to it.

I’ve set a program rule really simple (#{data_element} >10) associated with an error message. The program rule applies on a program which uses custom forms.

When I set the error message to be displayed next to the erroneous data element, DHIS2 simply ignores the program rule and I can validate the form whatever the answer I gave.

When I doesn’t set it to be displayed somewhere in particular (e.g. leave the fields blank), then the program rule is applied and an erroneous answer blocks me from validating the form.

Is there any reason for DHIS2 to ignore the program rule in the first case?

Thanks in advance :slight_smile:

Thomas


Thomas Warichet

www.bluesquarehub.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp