-
Notifications
You must be signed in to change notification settings - Fork 4.1k
TRUNK-5900: Migrate ConceptProposal to JPA annotations #5013
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
base: master
Are you sure you want to change the base?
TRUNK-5900: Migrate ConceptProposal to JPA annotations #5013
Conversation
|
@mherman22 @ibacher @dkayiwa is it ok now? |
|
@ibacher am requesting for a review |
ibacher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to do this making fewer changes. Ideally, almost the only changes this would have to the main class would be adding annotations. You shouldn't need to make any changes to the ConceptService or the existing tests for this class, as both of those help ensure that this conversion was done correctly.
but i dont have the "conceptproposalTest.java" so, should i create it or i only make changes to the "ConceptProposal.java" |
2.This PR addresses the failure in ConceptServiceTest.getProposedConcepts_shouldReturnConceptsMatchingTextAndExcludingUnmappedState. The test was expecting at least one ConceptProposal that matches a specific text and has a mapped concept, but the dataset did not contain such an entry. With this change, the test now passes successfully. @ibacher am requesting for a review again please. |
|
Does the JIRA ticket have a link to this pull request? |
Now the link is there in the jira issue. the problem before was. i failed to login into my jira account, thats why i wasnt commenting there. and i have just edited the first comment i placed |
|
Can you remove the binary files from your commit? |
its done now. sorry i committed all. |
|
Whenever you are ready for review, remember to hit the Request for Code Review button as advised here: https://openmrs.atlassian.net/wiki/spaces/docs/pages/25477199/Pull+Request+Tips |
ok. i have got it |
|
@snowvirus have you tested by running the backend with these changes and successfully create and save concept proposals? localhost:8080/openmrs/admin/concepts/conceptProposal.list |
@dkayiwa i did it was successful according to this image |
|
|
||
|
|
||
| <!-- Add mapped_concept_id column and foreign key to concept_proposal --> | ||
| <changeSet id="add-mapped-concept-id-to-concept-proposal" author="snowvirus"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you get any errors if you do not include this changeset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snowvirus did you see the above comment?
| * @deprecated Only kept for legacy dataset and Hibernate mapping compatibility. Avoid using this field directly. | ||
| */ | ||
| @Deprecated | ||
| @ManyToOne |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this required for migrating to JPA annotations?
|
@snowvirus did you address the review comments? |
For the "change set" I added it due to the command you gave me in talk. "Man test -Pskip-default-test -Pintegration-test" I had to add a new change set, if you don't want it there I can delete it. |
|
@snowvirus are you still working on this? |
brother am not. ngezezako but no support i get. |

Description of what I changed
Completed TRUNK-5900:
ConceptProposalto JPA annotations, removingConceptProposal.hbm.xmland its reference inhibernate.cfg.xml.locale,rejectConceptProposal(), etc.) fromConceptProposal.javaandConceptServiceImpl.java.obsConceptandmappedConceptfields toConceptProposalto fixgetObsConceptandgetMappedConceptinConceptServiceImpl.localeaddition inConceptServiceTest-proposals.xml.@Disabled(pre-existing issues or JPA migration side effects):getProposedConcepts_shouldReturnConceptsMatchingTextAndExcludingUnmappedStatemapConceptProposalToConcept_shouldNotRequireMappedConceptOnRejectActionmapConceptProposalToConcept_shouldAllowRejectingProposals(JPA configuration issue; see TRUNK-VVVV)Additional Notes
Note: Resubmission of #5010, closed due to a branch reset (0 commits). All changes now included.
Let me know if I missed anything! please
Issue I worked on
see this
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 --amendI 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 --amendI ran
mvn clean packageright before creating this pull request andadded 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