Skip to content

fix: Restrict data exchange request data items to allowable types only#22915

Draft
jason-p-pickering wants to merge 5 commits intomasterfrom
DHIS2-20860
Draft

fix: Restrict data exchange request data items to allowable types only#22915
jason-p-pickering wants to merge 5 commits intomasterfrom
DHIS2-20860

Conversation

@jason-p-pickering
Copy link
Contributor

@jason-p-pickering jason-p-pickering commented Feb 5, 2026

Fixes https://dhis2.atlassian.net/browse/DHIS2-20860 on the backend.

Does not deal with existing exchanges which might have non-allowable data item types, but since these are not expected to work in practice anyway, users should be able to resolve this.

Changes

  • Add E6306 error code for unsupported data item types in aggregate data exchange requests
  • Validate dx item types in AggregateDataExchangeObjectBundleHook using DimensionService to resolve each item and check its type against the allowed set
  • Add unit tests for disallowed types (REPORTING_RATE, PROGRAM_DATA_ELEMENT) and allowed types

Test plan

  • Existing unit tests pass (14/14)
  • Verified from the UI

@jason-p-pickering jason-p-pickering requested a review from a team February 5, 2026 15:22
@jason-p-pickering jason-p-pickering changed the title fix: Restrict data exchange requests to allowable types only fix: Restrict data exchange request data items to allowable types only Feb 6, 2026
@jason-p-pickering jason-p-pickering marked this pull request as draft February 11, 2026 12:26
@sonarqubecloud
Copy link

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.

1 participant