Skip to content

fix: omit optionSetId from dataItems query on DHIS2 < v42 [DHIS2-20499]#1839

Merged
BRaimbault merged 1 commit into
masterfrom
fix/DHIS2-20499
Jun 30, 2026
Merged

fix: omit optionSetId from dataItems query on DHIS2 < v42 [DHIS2-20499]#1839
BRaimbault merged 1 commit into
masterfrom
fix/DHIS2-20499

Conversation

@BRaimbault

@BRaimbault BRaimbault commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Implements DHIS2-20499


Key features

  1. The optionSetId field is no longer requested from the /dataItems endpoint on DHIS2 instances older than v42

Description

optionSetId was introduced in the /dataItems endpoint in DHIS2 v42 (DHIS2-18644) and was not backported to v40/v41. Requesting it on older instances caused a NoSuchFieldException: optionSetId warning to flood dhis.log every time the Data dimension panel was opened.

The fix gates the field behind a serverVersion.minor >= 42 check, following the same pattern used for other version-dependent features (supportsEDI for v40, enabled period types for v43). On v41 and below the option-set selector simply won't appear in the Data dimension, which is correct since the backend doesn't support it there.

@sonarqubecloud

Copy link
Copy Markdown

@BRaimbault BRaimbault merged commit df530e2 into master Jun 30, 2026
9 checks passed
@BRaimbault BRaimbault deleted the fix/DHIS2-20499 branch June 30, 2026 09:47
dhis2-bot added a commit that referenced this pull request Jun 30, 2026
## [29.5.5](v29.5.4...v29.5.5) (2026-06-30)

### Bug Fixes

* omit optionSetId from dataItems query on DHIS2 < v42 ([#1839](#1839)) ([df530e2](df530e2))
@dhis2-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 29.5.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants