OBPIH-6931 fix status not updating to "in progress" when editing a count#5123
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5123 +/- ##
============================================
- Coverage 8.09% 8.09% -0.01%
Complexity 934 934
============================================
Files 636 636
Lines 43102 43108 +6
Branches 10480 10480
============================================
Hits 3488 3488
- Misses 39073 39079 +6
Partials 541 541 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| * count item changes. | ||
| */ | ||
| private void recomputeCycleCountStatus(CycleCount cycleCount) { | ||
| cycleCount.status = cycleCount.recomputeStatus() |
There was a problem hiding this comment.
Should we now get rid of the status update from CycelCount.beforeUpdate() (permanent or temporary)? Or it is fine there as well?
There was a problem hiding this comment.
We'd need to also manually set the status when starting a recount because we call cycleCount.save() there as well. And potentially needs a fix to deal with that TODO in CycleCountSubmitCountCommand.
It's doable, but would require some additional investigation. I also have this post-launch task for us to reconsider if we even need recomputeStatus() at all (and instead simply set the status to a fixed value at each step, ex: submit count -> status is COUNTED).
So IMO since it's working currently, I think this is fine for now.
✨ Description of Change
Link to GitHub issue or Jira ticket: https://pihemr.atlassian.net/browse/OBPIH-6931
Description: Fixes a bug where a cycle count status was staying at "To count" (instead of moving to "In progress", even after being edited.
📷 Screenshots & Recordings (optional)
https://jam.dev/c/665fdbb2-861f-4c2b-b0e7-a689a76df42d