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-6220: When setting the session locale from the user's default locale property, the default locale should be validated #4560

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

IamMujuziMoses
Copy link
Contributor

Issue I worked on

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

Checklist: I completed these to help reviewers :)

  • My IDE is configured to follow the code style of this project.

    No? Unsure? -> configure your IDE, format the code and add the changes with git add . && git commit --amend

  • I have added tests to cover my changes. (If you refactored
    existing code that was well tested you do not have to add tests)

    No? -> write tests and add them to this commit git add . && git commit --amend

  • I ran mvn clean package right before creating this pull request and
    added all formatting changes to my commit.

    No? -> execute above command

  • All new and existing tests passed.

    No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.

  • My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master

@IamMujuziMoses
Copy link
Contributor Author

@dkayiwa @ibacher could you please review this PR

catch (Exception t) {
log.warn("Unable to parse default locale global property value: " locale, t);
}
if (StringUtils.hasLength(locale) && isValid(fromSpecification(locale))) {
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't require two calls to fromSpecification(). However, this PR is also not dealing with the issue in the ticket, which is about the user's default locale property, not the property from the global property. The change here is unnecessary because we validate the global property when setting it.

…ocale property, the default locale should be validated
…ocale property, the default locale should be validated
@IamMujuziMoses
Copy link
Contributor Author

@ibacher I have made some changes based on the earlier review

Copy link

github-actions bot commented Aug 4, 2024

tl;dr our action detected no activity on this PR and will close it in 30 days if the stale label is not removed.

OpenMRS welcomes your contribution! It means a lot to us that you want to contribute to equity in healthcare!

This PR has not seen any activity in the last 5 months. That is why we wanted to check whether you are still working on it or need assistance from our side.
Please note that this is an automated message and we might very well be the reason why there has not been any activity lately. We certainly do not want to discourage you from contributing. We do need to be honest in that OpenMRS has limited resources for reviewing PRs.

If you do not have time to continue the work or have moved on you don’t need to do anything. We will automatically close the PR in 30 days. We hope to see you back soon :)
If you would like to continue working on it or require help from us please remove the stale label and respond by commenting on the issue.

@github-actions github-actions bot added the Stale label Aug 4, 2024
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.

2 participants