I have built a program rule to hide a repeatable program stage, but the problem is that the PR does not always hold true. The program rule works the first time. In the image below, when I try to add more events than those defined in the program rule expressions, it shows the following message: “All the expected events are already present, cannot create more events.”, which is correct.
But when I close the message, hit the back button and click again on the tracked entity and click the add button, it allows to add to more events.
This is after clicking the tracked entity after clicking back. Now the PR is not validating
The program rule is not always holding true since I expected to see the same message preventing me from adding events whenever I try to.
Is there any reason for this program rule behavior behavior? This is a very important validation for my use case.