OBPIH-7571 Fix missing 'user recounted' when quantity set to 0#5626
Merged
alannadolny merged 1 commit intorelease/0.9.6from Nov 17, 2025
Merged
OBPIH-7571 Fix missing 'user recounted' when quantity set to 0#5626alannadolny merged 1 commit intorelease/0.9.6from
alannadolny merged 1 commit intorelease/0.9.6from
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug where the "user recounted" field was missing when the quantity is set to 0, which can result in an empty cycleCountItems array. The fix adds a defensive check to ensure the code doesn't attempt to access the first element of an empty array and instead falls back to the assignee from the verification count.
- Added length validation before accessing
cycleCountItems[0] - Implemented fallback to
verificationCount.assigneewhen no cycle count items exist - Improved robustness of the recounted-by data extraction logic
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/0.9.6 #5626 +/- ##
===============================================
Coverage ? 8.55%
Complexity ? 1130
===============================================
Files ? 712
Lines ? 45640
Branches ? 10913
===============================================
Hits ? 3903
Misses ? 41154
Partials ? 583 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ewaterman
approved these changes
Nov 14, 2025
kchelstowski
approved these changes
Nov 17, 2025
11dfa3a to
d5c0d0a
Compare
d5c0d0a to
672b952
Compare
alannadolny
approved these changes
Nov 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Description of Change
Link to GitHub issue or Jira ticket:
https://pihemr.atlassian.net/browse/OBPIH-7571
Description:
📷 Screenshots & Recordings (optional)