Skip to content

feat(templates): multi org unit selection and alphabetical row order for custom dataSets#407

Open
gqcorneby wants to merge 3 commits into
developmentfrom
feature/custom-dataset-multiple-org-units
Open

feat(templates): multi org unit selection and alphabetical row order for custom dataSets#407
gqcorneby wants to merge 3 commits into
developmentfrom
feature/custom-dataset-multiple-org-units

Conversation

@gqcorneby

@gqcorneby gqcorneby commented Jul 6, 2026

Copy link
Copy Markdown

📌 References

📝 Implementation

  • Add hidden allowMultipleOrgUnits opt-in on custom templates. When set, custom dataSet templates allow multi-select in the org unit picker (previously forced single-select).
  • Add hidden orgUnitSort: "ALPHABETICAL" opt-in. When set, DownloadTemplateUseCase orders the exported data entries by each org unit's ancestor-name path — pre-order (parent before children), siblings alphabetical — matching the org unit tree. displayName rides the existing getElement fetch, so there is no extra API call.

🔥 Notes for the reviewer

TJK dev server template: CUSTOM R2 Report on SAM Treatment - Pediatric Wards/Hospitals (Monthly) V2

📹 Screenshots/Screen capture

image

📑 Others

Enable per template with:

"allowMultipleOrgUnits": true,
"orgUnitSort": "ALPHABETICAL"

gqcorneby added 3 commits July 3, 2026 17:30
Hidden author-set opt-in that lets custom dataSet templates enable multi
org unit selection in the download picker (previously forced single-select).
Add hidden orgUnitSort:"ALPHABETICAL" opt-in for custom dataSet templates.
When set, DownloadTemplateUseCase orders the exported data entries by each
org unit's ancestor-name path (pre-order, siblings alphabetical), matching
the org unit tree. displayName rides the existing getElement fetch, so no
extra API call.
Replace the mirrored useState + set/reset with a value derived from the
selected custom template, removing state that had to be kept in sync.
@bundlemon

bundlemon Bot commented Jul 6, 2026

Copy link
Copy Markdown

BundleMon

No change in files bundle size

Groups updated (1)
Status Path Size Limits
Build Folder
./**/*
1.74MB (+149B +0.01%) +20%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@gqcorneby gqcorneby requested a review from anagperal July 6, 2026 04:35

@anagperal anagperal left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @gqcorneby !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants