Skip to content

fix: include itemFilters in hasDateQueryItem check to prevent E7205 on stage date filters - #23954

Merged
luciano-fiandesio merged 8 commits into
masterfrom
DHIS2-21526_FILTER_WITH_STAGESPECIFIC_DATE
May 20, 2026
Merged

fix: include itemFilters in hasDateQueryItem check to prevent E7205 on stage date filters#23954
luciano-fiandesio merged 8 commits into
masterfrom
DHIS2-21526_FILTER_WITH_STAGESPECIFIC_DATE

Conversation

@luciano-fiandesio

Copy link
Copy Markdown
Contributor

Problem

Requests to the Events Aggregate API containing a stage-specific date filter (e.g. filter=A03MvHHogjR.EVENT_DATE:LAST_6_MONTHS) were incorrectly rejected with error E7205 ("Start and end date or at least one period must be specified"), even though the filter provides valid period constraints.

Root Cause

DefaultEventQueryValidator.hasDateQueryItem() only inspected params.getItems(). API filters are stored in params.getItemFilters(), so the validator failed to detect the date constraint and triggered the E7205 check.

Fix

  • Changed hasDateQueryItem() to use params.getItemsAndItemFilters(), consistent with other similar checks in EventQueryParams.

@luciano-fiandesio luciano-fiandesio added run-api-analytics-tests Enables analytics e2e tests run-api-analytics-tests-doris Enables analytics e2e tests on Doris labels May 19, 2026
@github-actions

Copy link
Copy Markdown

Surefire reports for analytics API tests against Doris have been pushed to the repository. View reports

1 similar comment
@github-actions

Copy link
Copy Markdown

Surefire reports for analytics API tests against Doris have been pushed to the repository. View reports

@github-actions

Copy link
Copy Markdown

Surefire reports for analytics API tests against Doris have been pushed to the repository. View reports

@github-actions

Copy link
Copy Markdown

Surefire reports for analytics API tests against Doris have been pushed to the repository. View reports

1 similar comment
@github-actions

Copy link
Copy Markdown

Surefire reports for analytics API tests against Doris have been pushed to the repository. View reports

@github-actions

Copy link
Copy Markdown

Surefire reports for analytics API tests against Doris have been pushed to the repository. View reports

@github-actions

Copy link
Copy Markdown

Surefire reports for analytics API tests against Doris have been pushed to the repository. View reports

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Surefire reports for analytics API tests against Doris have been pushed to the repository. View reports

@luciano-fiandesio
luciano-fiandesio merged commit 64084c3 into master May 20, 2026
18 checks passed
@luciano-fiandesio
luciano-fiandesio deleted the DHIS2-21526_FILTER_WITH_STAGESPECIFIC_DATE branch May 20, 2026 09:11
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.

3 participants