Repository navigation
Dataset Attribute Options: Organisation Unit Filter Mode - #418
Open
icrc-tafsirdiallo wants to merge 9 commits into
Open
icrc-tafsirdiallo wants to merge 9 commits into
icrc-tafsirdiallo wants to merge 9 commits into
Conversation
Bumps the npm_and_yarn group with 1 update in the / directory: [qs](https://github.com/ljharb/qs). Updates `qs` from 6.15.3 to 6.16.0 - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.15.3...v6.16.0) --- updated-dependencies: - dependency-name: qs dependency-version: 6.16.0 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
Fix: Add configurable category/attribute option organisation unit filter mode
For data sets with sections, getDataElementsForSectionDataSet regrouped the (already section-ordered) data elements by category combo. This pulled elements with the default category combo ahead of elements with other category combos, across and within sections, so the template columns no longer followed the configured section and data element order. Map each data element directly to the category option combos of its own category combo instead, preserving the order: sections by sortOrder, then elements within each section, then elements outside sections. This applies both to the single "Data Entry" tab and to the per-section tabs.
removed added typo for return type .value() as before.
…t-order-generated fix: keep section/data element order in generated data set template
…049d63b98d chore(deps): bump qs from 6.15.3 to 6.16.0 in the npm_and_yarn group across 1 directory
…ions-error-handling Fix / Added completeDataSetRegistrations API error results to JSON response
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dataset Attribute Options: Organisation Unit Filter Mode
Summary
Add a configurable setting that controls whether a dataset attribute/category option assigned to an organisation unit is available only at that organisation unit or also at its descendants when generating Bulk Load templates.
The setting provides two modes:
assignedAndDescendants— available at the assigned organisation unit and all descendants. Default.assigned— available only at the organisation unit(s) where the category option is directly assigned.The default behaviour is ancestry-aware and matches how DHIS2 Data Entry resolves category option availability.
Current Status
Currently, Bulk Load uses strict organisation-unit matching when filtering category options.
If a category option is assigned to a parent organisation unit, it is only considered available when generating a template for that exact organisation unit. It is not automatically available for descendant organisation units.
For example:
If Partner A is assigned only to
Country, the current Bulk Load behaviour is:Scope
Included
Not Included
This change does not affect:
Import behaviour remains unchanged.
ImportTemplateUseCaseonly validates that:It does not re-check whether the attribute option combo is valid for that organisation unit.
Backward Compatibility
The new setting defaults to:
This preserves the intended ancestry-aware behaviour as the default for existing and new instances.
Administrators who require strict direct-assignment behaviour can explicitly select:
No migration of existing category-option organisation-unit assignments is required.
Manual Verification
Use the following organisation-unit hierarchy:
With Partner A assigned only to
Country:1. Verify
assignedAndDescendantsassignedAndDescendants.2. Verify
assignedassigned.3. Verify direct assignment
assigned.4. Verify ancestry-aware behaviour is restored
assignedAndDescendants.Reviewer Focus
Please verify the following:
assignedAndDescendants.assignedmode does not resolve organisation-unit hierarchy paths unnecessarily.