Skip to content

test: assert optionSet on stage-scoped data element headers [DHIS2-21344]#24395

Open
jason-p-pickering wants to merge 3 commits into
masterfrom
test/optionset-header-coverage_master
Open

test: assert optionSet on stage-scoped data element headers [DHIS2-21344]#24395
jason-p-pickering wants to merge 3 commits into
masterfrom
test/optionset-header-coverage_master

Conversation

@jason-p-pickering

Copy link
Copy Markdown
Contributor

Summary

  • EventsAggregate5AutoTest already exercised an optionSet-backed, stage-scoped data element (Zj7UnCAulEk.fWIAEtYVEGk, Mode of Discharge) in two tests, but both asserted the header via the ValidationHelper.validateHeader overload that skips optionSet, using the existing 8-arg overload instead of the 9-arg one that already asserts it.
  • This gap meant neither test would have caught DataElement.optionSet going missing from /api/analytics/events/aggregate headers — which is exactly what happened on the 2.43 maintenance line (see fix: backport DataElement.optionSet Hibernate mapping fix to 2.43 #24394) after 12ebdf2d78 ("chore: annotation mapping for DataElement", chore: annotation mapping for DataElement #23092) fixed a latent Hibernate mapping bug on master but was never backported.
  • Master itself is unaffected (already has 12ebdf2d78), so this PR is test-coverage only — no production code change.

Test plan

  • mvn compile passes on dhis-test-e2e.
  • CI run on this PR.

🤖 Generated with Claude Code

…344]

EventsAggregate5AutoTest already exercised Zj7UnCAulEk.fWIAEtYVEGk (Mode
of Discharge, an optionSet-backed data element in a program stage) but
asserted the header via the validateHeader overload that skips
optionSet, so the DataElement.optionSet mapping regression fixed by
#23092's cherry-pick would not have been caught by CI.
@jason-p-pickering jason-p-pickering added run-api-analytics-tests Enables analytics e2e tests run-api-analytics-tests-doris Enables analytics e2e tests on Doris labels Jul 8, 2026
@jason-p-pickering jason-p-pickering requested review from a team and stian-sandvold July 8, 2026 13:43
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

Labels

run-api-analytics-tests Enables analytics e2e tests run-api-analytics-tests-doris Enables analytics e2e tests on Doris

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant