Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include event programs for export [DHIS2-17672] #2058

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

tomzemp
Copy link
Member

@tomzemp tomzemp commented Jul 1, 2024

See https://dhis2.atlassian.net/jira/software/c/projects/DHIS2/issues/DHIS2-17672

This PR fixes an issue whereby the programs query had been amended to filter out WITHOUT_REGISTRATION (event) programs, which is relevant for the Tracked Entity Export page, but not for the Event export page.

Due to the structure of the existing code, I opted to just add an additional query (without filters) and look up the appropriate within based on a new includeEvents parameter.

Automated tests

I've added a test for to check that useDataQuery is called with the right query based on the includeEvents parameter. There is little test coverage in this app, currently; I think the test for this change could be written better, but it requires a bunch more setup, like setting up a query provider.

Manual tests

Event export page:
image
note: Antenatal care visit which is an event program is shown

Tracked entity export page:
image

note: Antenatal care visit which is an event program is NOT shown

@tomzemp tomzemp requested review from Chisomchima and a team July 1, 2024 08:49
@dhis2-bot
Copy link
Contributor

🚀 Deployed on https://pr-2058--dhis2-import-export.netlify.app

Copy link
Contributor

@kabaros kabaros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌🏿

@tomzemp tomzemp merged commit 230b77e into master Jul 1, 2024
9 checks passed
@tomzemp tomzemp deleted the DHIS2-17672/event-programs-for-export branch July 1, 2024 09:53
dhis2-bot added a commit that referenced this pull request Jul 1, 2024
## [101.1.7](v101.1.6...v101.1.7) (2024-07-01)

### Bug Fixes

* include event programs for export [DHIS2-17672] ([#2058](#2058)) ([230b77e](230b77e))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 101.1.7 🎉

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.

4 participants