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

RESTWS-942 - Obs for a Concept Numeric with allowDecimal = false shou… #612

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

mseaton
Copy link
Member

@mseaton mseaton commented Jun 17, 2024

…ld not return a decimal as a value

See: https://openmrs.atlassian.net/browse/RESTWS-942

@coveralls
Copy link

Coverage Status

coverage: 47.138% (+0.02%) from 47.118%
when pulling ebc27c9 on RESTWS-942
into 14e6f5b on master.

Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

LGTM!

@dkayiwa
Copy link
Member

dkayiwa commented Jun 17, 2024

@mseaton could there be a reason why you did not just fix this in core on the line that @chibongho pointed at?

@mseaton
Copy link
Member Author

mseaton commented Jun 17, 2024

@mseaton could there be a reason why you did not just fix this in core on the line that @chibongho pointed at?

I did fix it there @dkayiwa , in a different PR associated with core that I tagged you on. But that wouldn't fix this issue AFAIK, as the issue in core is in the getValueAsString method, whereas this REST response is the actual value itself (not necessarily as a string).

@dkayiwa
Copy link
Member

dkayiwa commented Jun 17, 2024

whereas this REST response is the actual value itself (not necessarily as a string).

But the value will not have a decimal point because it was not stored with it in the first place. So obs.getValueNumeric() would fetch it as expected. Not so?

@mseaton
Copy link
Member Author

mseaton commented Jun 17, 2024

But the value will not have a decimal point because it was not stored with it in the first place. So obs.getValueNumeric() would fetch it as expected. Not so?

I don't see why that would be. It's a double in the DB. Whether 40 or 40.0 is saved originally, the value in the db would be the same. It's how it is read out and converted from a Double to an Integer that matters in the end, right?

@dkayiwa
Copy link
Member

dkayiwa commented Jun 17, 2024

Correct! 😊

@dkayiwa dkayiwa merged commit c5af83f into master Jun 17, 2024
1 check passed
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.

4 participants