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: mandatory attributes cannot have empty value [DHIS2-18365] #19586

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

jbee
Copy link
Contributor

@jbee jbee commented Jan 2, 2025

Summary

The main issue was that an empty string value was considered as being present.

Secondary issue was that the attribute value parsing in 2.42 did not accept any other JSON values than a JSON string.
While this is strictly correct the app apparently does use JSON boolean so the parsing was adjusted to handle other JSON types.

For better visibility in case of errors the JobProgress tracking for synchronous metadata imports was changed to use RecordingJobProgress.transitory which behaves like a persistent tracking except that it discards completed nodes in the progress tree.

Manual Testing

See Jira description

Automatic Testing

2 new test scenarios where added testing that adding a user either with an empty value for the mandatory attribute or entirely without the attribute results in a CONFLICT response.

@jbee jbee self-assigned this Jan 2, 2025
Copy link

sonarqubecloud bot commented Jan 6, 2025

@jbee jbee marked this pull request as ready for review January 6, 2025 11:46
@jbee jbee merged commit 5cfe13f into master Jan 6, 2025
17 checks passed
@jbee jbee deleted the DHIS2-18365 branch January 6, 2025 13:37
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