We have configured a number of program rules using inOrgUnitGroup to restrict triggering to specific organisation unit level in the hierarchy. They work wonderfully within the event capture interface, however it does not work via API import (please note that the other program rules without the org unit restriction work fine through the API).
Due to our project’s requirements, events are initially recorded in an Excel template and then imported into DHIS2. Therefore, this configuration is critical for our implementation.
We have also tried using V{orgunit_group} without success. Can anyone please advice or help on an alternative?
Thanks for your explanation. Summarizing from your post, a reproduction of this issue would be to follow the following steps:
Create a program rule with condition that it triggers only when inOrgUnitGroup
Test that the program rule works when using the Capture app
Import values using the API - the inOrgUnitGroup filter doesn’t work.
Would you share the API request you are sending? Since you are importing using the API, wouldn’t it be possible to filter the values before importing? As an alternative, did you try to import using the Import/Export app?
Finally, please share what is the version of the DHIS2 instance that you are using.