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: dates issues [DHIS2-18087] #102

Merged
merged 2 commits into from
Sep 26, 2024
Merged

Conversation

tomzemp
Copy link
Member

@tomzemp tomzemp commented Sep 23, 2024

Background

This PR fixes the two issues described in the ticket: https://dhis2.atlassian.net/browse/DHIS2-18087

Analytics relative time
Updates to use useTimeZoneConversion hook to correct for time zone. This information appears when you retrieve data results for an exchange.

(Note here I looked at the exchange 10 minutes after running analytics, so it was about 13:50 and analytics was run at 13:40, but I set my computer time zone to Washington DC)
Before
image

After
image

Ambiguous dates in exchange cards
Changes to format based on the specified system dateFormat (yyyy-mm-dd or dd-mm-yyyy). This information appears on the overview page when editing configurations.

Before
image

After
image

Testing

I've tested this manually (for time zone, I've changed my time zone locally). I've also added some automatic tests. I altered the overall high-level test to check for the date stamp in the exchange cards and then added a lower-level test to check that the dates appear correct based on the system dateFormat + the given date. I've also kept the tests for the time zone correction for analytics time stamp at a lower level as we were already checking for the text generally.

@tomzemp tomzemp requested review from a team as code owners September 23, 2024 11:59
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Sep 23, 2024

🚀 Deployed on https://pr-102--dhis2-data-exchange.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify September 23, 2024 12:02 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 23, 2024 13:47 Inactive
@tomzemp tomzemp merged commit 5fdfc25 into master Sep 26, 2024
8 checks passed
dhis2-bot added a commit that referenced this pull request Sep 26, 2024
## [100.9.7](v100.9.6...v100.9.7) (2024-09-26)

### Bug Fixes

* dates issues [DHIS2-18087] ([#102](#102)) ([5fdfc25](5fdfc25))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.9.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.

3 participants