Spaces in Program Rule Variables: What does it break?

Hi All!

I’ve noticed that in 2.37.8 and 2.38.1.1 (and not in 2.35 or earlier versions) that any program rule variables that have a space (" ") in them will not function when using d2:hasValue() operators in expressions. The expression will validate correctly when typing it out and when going back to check on it, however will always come up as “false” no matter if the expression should be triggered or not.

I’ve created a ticket for this here: [DHIS2-13974] - Jira

What I’m curious about is if others have experienced other issues with spacing in program rule variables that I haven’t found yet. I am in the midst of testing upgrade candidates for a large server, and would love to hear if other’s have experienced similar issues. Thanks for your time!

1 Like

Hi @Matthew_Boddie,

Thank you for your post! I’m tagging @tracker-programRules to as about this functionality; additionally, I moved your post to Implementation - Implémentation category with hope that this discussion will be interesting for other implementers.

Thank you!

1 Like

Much appreciated @Gassim !

1 Like

Hey Matthew,

@superskip shared with me this ticket. The issue has been fixed recently: [DHIS2-13906] - Jira

And @YuryR strongly recommends that program rule variables to be CAPITAL_CASE_WITH_UNDERSCORES only. I also found this resource which might be helpful: Naming Conventions - DHIS2 Documentation

Thank you!