Skip to content

OBPIH-7571 Fix missing 'user recounted' when quantity set to 0#5626

Merged
alannadolny merged 1 commit intorelease/0.9.6from
bug/OBPIH-7571
Nov 17, 2025
Merged

OBPIH-7571 Fix missing 'user recounted' when quantity set to 0#5626
alannadolny merged 1 commit intorelease/0.9.6from
bug/OBPIH-7571

Conversation

@SebastianLib
Copy link
Collaborator

✨ Description of Change

Link to GitHub issue or Jira ticket:
https://pihemr.atlassian.net/browse/OBPIH-7571

Description:


📷 Screenshots & Recordings (optional)

@github-actions github-actions bot added type: bug Addresses unintended behaviours of the app domain: frontend Changes or discussions relating to the frontend UI labels Nov 14, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.assignee when 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
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/0.9.6@cb115dd). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alannadolny alannadolny changed the base branch from develop to release/0.9.6 November 17, 2025 09:51
@github-actions github-actions bot added the domain: devops Changes or discussions relating to dev ops automation label Nov 17, 2025
@alannadolny alannadolny merged commit 39f7740 into release/0.9.6 Nov 17, 2025
7 checks passed
@alannadolny alannadolny deleted the bug/OBPIH-7571 branch November 17, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: devops Changes or discussions relating to dev ops automation domain: frontend Changes or discussions relating to the frontend UI type: bug Addresses unintended behaviours of the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants