Make dataelement compulsory using rules using custom form (DHIS2 2.34)

Hi community,

Describing the issue: A custom form to collect event data in a tracker program, when data elements are compulsory from the program design it works fine (tracker app stopping complete when missing), however when we try to make other data element compulsory using rules (based on previous data element values), we can still complete the program even when the data element is missing, like the rule is not working. If we remove the custom form, the rule works as expected.

Any idea how to make this work with custom forms?

Your help will be highly apprecciated!

Thanks

William

Hi @waviles,

Welcome back to the community! :tada:

Program rules should work in custom forms in both the Tracker Capture app as well as the Capture app. Please make sure you clear the browser cache.

Would you please mention the following:

  1. dhis2 version you are using
  2. Tracker Capture app or Capture app
  3. Steps to reproduce this on any of the play.dhis2.org instances

Thank you!

Hi @Gassim Thanks for your quick response,

  1. DHIS2 2.34
  2. Tracker Capture
  3. Do you have any custom form in play instances? I can’t see 2.34 anymore on play but i will try to reproduce in 2.35.

Worth to mention that the specific rule action that is not working is “Make field mandatory”, all other rules work as expected.

Let you know how it goes with play, thanks so much again,

William

Hi @Gassim

As additional information, I found a couple of JIRA tickets related to this (Log in - DHIS 2 JIRA) where they have reproduced the issue in play instances. As you can see there bug is reproducible in 2.34 as well. The ticket is really old and marked as TODO, however is unassigned.

Any comment?

Thanks!

William

Yes, thanks @waviles! I was able to reproduce this on 2.35.14 on play. I changed one of the forms to a custom form to perform the test.

I will be following up with @tracker-backend regarding this bug. Feel free to add your vote in the ticket you watched.

Thank you!

Thanks so much @Gassim

Added my vote and started watching the ticket.

Best

William