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

TRUNK-6223 - RequiredDataAdvice should validate after save handlers e… #4559

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

mseaton
Copy link
Member

@mseaton mseaton commented Feb 15, 2024

…xecute

Issue I worked on

see https://issues.openmrs.org/browse/TRUNK-6223

PersonAddress pa = Context.getPersonService().getPersonAddressByUuid("3350d0b5-821c-4e5e-ad1d-a9bce331e118");
pa.setVoided(true);
pa.setVoidReason(null);
Context.getPersonService().savePersonAddress(pa);
Copy link
Member Author

Choose a reason for hiding this comment

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

This test as written didn't make a lot of sense. Not sure y it is setting void reason twice. In any event, the PersonValidator has an explicit check to ensure the void reason is non-null, and based on the name of this test method, the idea is to ensure you can leave void reason null for types other than Patient and Encounter, so I changed this to PersonAddress and things work fine.

@coveralls
Copy link

Coverage Status

coverage: 63.814% (-0.09%) from 63.907%
when pulling 523c5b3 on TRUNK-6223
into 4388021 on 2.6.x.

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, though see my comments on the ticket.

Copy link
Member

@dkayiwa dkayiwa left a comment

Choose a reason for hiding this comment

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

I am currently not aware of any problems that may result from this change. So looks good to me.

@mseaton mseaton merged commit 50a61b5 into 2.6.x Feb 15, 2024
2 checks passed
@mseaton mseaton deleted the TRUNK-6223 branch February 15, 2024 23:05
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