Fix org unit validation on template download#391
Conversation
- Only require organisation unit selection when downloading populated tracker templates. - This prevents dataset template downloads from being blocked when org unit selection is configured for import-only, and defaults relationship OU filter to CAPTURE in that mode.
BundleMonNo change in files bundle size Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
Ramon-Jimenez
left a comment
There was a problem hiding this comment.
@xurxodev I think this is not entirely right.
While it is now possible to download the spreadsheet, the OrgUnit selector becomes empty. If I get it right, it should bring OU's configured for Capture privileges for the user downloading the template, but it is not doing so.
Could you please double check?
Thanks
…ection is set to import When orgUnitSelection setting is "import", the org unit selector is hidden on the download page, so no org units are sent to the download use case. This left the org unit selector empty in the generated spreadsheet. Now it falls back to the intersection of the current user's capture org units and the org units of the selected dataset/program.
|
@Ramon-Jimenez ready |
|
@xurxodev Working OK for OrgUnits that match exactly both Dataset and Capture privileges. But it seems it is not taking into account scenario where Dataset is configured for some 'children' OrgUnits and user has Capture privileges to 'parent' OrgUnit. In those cases, it is not pulling the OrgUnits, but it should. |
…nloaded template when org unit selection is set to import
|
@Ramon-Jimenez ready |
Ramon-Jimenez
left a comment
There was a problem hiding this comment.
Working great, thanks @xurxodev
📌 References
📝 Implementation
🔥 Notes for the reviewer
📹 Screenshots/Screen capture
Tested using MSF VPN
vpn_msf.mov
Tested using play 2.42
2.42-play.mov
📑 Others