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: EventDataValue mapping with idScheme!=UID DHIS2-14968 #19303

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

teleivo
Copy link
Contributor

@teleivo teleivo commented Nov 27, 2024

Event dataValue.storedBy is set on import

This might not always have been the case. At least in SL DB there are dataValues without that property in the JSONB.

event.eventdatavalues being JSONB leads to a different query when dataElementIdScheme!=UID see #19153. This then requires different code to aggregate the rows into the event and its dataValues.

I defaulted to the empty string using dataValueJson.getString("storedBy").string("") which meant it was exported as such. This was different than when requesting idScheme=UID where no storedBy in the DB means no storedBy property in the JSON. This PR aligns dataElementIdScheme!=UID with dataElementIdScheme==UID.

@teleivo teleivo force-pushed the DHIS2-14968-storedby branch from a508a4a to 6eaaf73 Compare November 27, 2024 04:54
@teleivo teleivo marked this pull request as ready for review November 27, 2024 05:04
@teleivo teleivo requested a review from a team as a code owner November 27, 2024 05:04
@teleivo teleivo merged commit e88bcfd into master Nov 27, 2024
15 checks passed
@teleivo teleivo deleted the DHIS2-14968-storedby branch November 27, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants