TRUNK-5891: ProgramWorkflowState Domain - Switching from Hibernate Mappings to Annotations#5792
Conversation
5a6aaf5 to
59101d7
Compare
298fcf5 to
4d8b86e
Compare
ecc05bb to
64402d8
Compare
|
Hi @dkayiwa, All tests are passing successfully on my local machine. However, they are failing on the CI side. Could you please help me understand what might be causing this difference? Thank you. |
|
@Chinmay7070 the failing test has just been fixed in core. Did you take a look at the new sonar issue? |
|
@dkayiwa please review when you got chance. |
| --failOnCVSS 6.2 | ||
| --enableRetired | ||
| --suppression dependency-check-suppressions.xml | ||
| --nvdApiKey ${{ secrets.NVD_API_KEY }} |
There was a problem hiding this comment.
Hi @dkayiwa,
No, this is also not related to TRUNK-5891. I removed the --nvdApiKey line because it was causing the OWASP Dependency Check workflow to fail on fork PRs .
However, if this change should not be part of my PR, I can revert it. Please let me know.
There was a problem hiding this comment.
Can we also discard this change?
There was a problem hiding this comment.
Yes, I’ll discard this change and update the PR shortly.
| ancestors.add(obs); | ||
| for (Obs child : obs.getGroupMembers()) { | ||
| validateHelper(child, errors, ancestors, false); | ||
| for (Obs child : obs.getGroupMembers(true)) { |
There was a problem hiding this comment.
Hi @dkayiwa,
No, the ObsValidator.java changes are not related to TRUNK-5891. My branch was created before this fix was merged to master, which is why it's showing as a change in the diff. I have now synced my branch with the latest upstream master, so ObsValidator now matches the current version.
There was a problem hiding this comment.
Yes @dkayiwa, done! I've synced with upstream/master and removed the ObsValidator changes from this PR.
There was a problem hiding this comment.
Kindly a space is needed after a comma please!
| @AttributeOverride(name = "name",column = @Column(name = "name", nullable = true, length = 255)) | |
| @AttributeOverride(name = "name", column = @Column(name = "name", nullable = true, length = 255)) |
There was a problem hiding this comment.
Thank you @jwnasambu
I will add the space after the comma.
6168a94 to
e396ffe
Compare
There was a problem hiding this comment.
Kindly fix the comment reference to something like this:
| <comment>Add audit columns required by Order JPA mapping for TRUNK-5891</comment> | |
| <comment>Add audit columns required by ProgramWorkflowState JPA mapping for TRUNK-5891</comment> |
There was a problem hiding this comment.
Thank you @jwnasambu for the review!
the comment should reference ProgramWorkflowState, not Order. I will fix this along with the spacing issue.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5792 +/- ##
============================================
+ Coverage 57.99% 58.01% +0.01%
Complexity 9139 9139
============================================
Files 683 683
Lines 37058 37058
Branches 5420 5420
============================================
+ Hits 21491 21498 +7
+ Misses 13654 13651 -3
+ Partials 1913 1909 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
kindly the word shouldn't be truncated as "ProgramWorkflowStat" instead should be full "ProgramWorkflowState"
| <comment>Add audit columns required by ProgramWorkflowStat JPA mapping for TRUNK-5891</comment> | |
| Add audit columns required by ProgramWorkflowState JPA mapping for TRUNK-5891 |
There was a problem hiding this comment.
Thanks @jwnasambu for catching both!
Apparently I was being too economical with spaces AND letters 😅 Will fix them!
|



Description of what I changed
This PR migrates the ProgramWorkflowState entity from Hibernate XML mapping (HBM) to JPA annotations as part of the ongoing JPA migration effort in OpenMRS core.
Changes:
Issue I worked on
see https://issues.openmrs.org/browse/TRUNK-5891
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