Skip to content

OBPIH-6931 fix status not updating to "in progress" when editing a count#5123

Merged
awalkowiak merged 1 commit intodevelopfrom
bug/OBPIH-6931-update-in-progress-count-status
Mar 13, 2025
Merged

OBPIH-6931 fix status not updating to "in progress" when editing a count#5123
awalkowiak merged 1 commit intodevelopfrom
bug/OBPIH-6931-update-in-progress-count-status

Conversation

@ewaterman
Copy link
Member

✨ 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

@ewaterman ewaterman self-assigned this Mar 12, 2025
@github-actions github-actions bot added type: bug Addresses unintended behaviours of the app domain: backend Changes or discussions relating to the backend server labels Mar 12, 2025
@codecov
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 8.09%. Comparing base (0b46d2b) to head (464b6ab).
Report is 170 commits behind head on develop.

Files with missing lines Patch % Lines
...g/pih/warehouse/inventory/CycleCountService.groovy 0.00% 8 Missing ⚠️
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.
📢 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.

* count item changes.
*/
private void recomputeCycleCountStatus(CycleCount cycleCount) {
cycleCount.status = cycleCount.recomputeStatus()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we now get rid of the status update from CycelCount.beforeUpdate() (permanent or temporary)? Or it is fine there as well?

Copy link
Member Author

@ewaterman ewaterman Mar 13, 2025

Choose a reason for hiding this comment

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

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok

@awalkowiak awalkowiak merged commit a9ae2be into develop Mar 13, 2025
9 checks passed
@awalkowiak awalkowiak deleted the bug/OBPIH-6931-update-in-progress-count-status branch March 13, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: backend Changes or discussions relating to the backend server type: bug Addresses unintended behaviours of the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants