Skip to content

OBPIH-7346 add more cycle count reason codes#5582

Merged
ewaterman merged 1 commit intodevelopfrom
ft/OBPIH-7346-more-cc-reason-codes
Oct 30, 2025
Merged

OBPIH-7346 add more cycle count reason codes#5582
ewaterman merged 1 commit intodevelopfrom
ft/OBPIH-7346-more-cc-reason-codes

Conversation

@ewaterman
Copy link
Member

✨ Description of Change

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

Description: Add support for new reason codes (aka root causes) for cycle count. This required me to add a new activity code.


📷 Screenshots & Recordings (optional)

Screenshot from 2025-10-29 14-21-41

@ewaterman ewaterman self-assigned this Oct 29, 2025
@github-actions github-actions bot added type: feature A new piece of functionality for the app domain: frontend Changes or discussions relating to the frontend UI domain: backend Changes or discussions relating to the backend server domain: l10n Changes or discussions relating to localization & Internationalization labels Oct 29, 2025
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 8.50%. Comparing base (1bb7314) to head (c1775ae).
⚠️ Report is 169 commits behind head on develop.

Files with missing lines Patch % Lines
...g/pih/warehouse/api/ReasonCodeApiController.groovy 0.00% 2 Missing ⚠️
...in/groovy/org/pih/warehouse/core/ReasonCode.groovy 0.00% 2 Missing ⚠️
.../org/pih/warehouse/inventory/CycleCountItem.groovy 0.00% 1 Missing ⚠️
...h/warehouse/inventory/CycleCountItemCommand.groovy 0.00% 1 Missing ⚠️
...house/inventory/CycleCountUpdateItemCommand.groovy 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             develop   #5582      +/-   ##
============================================
- Coverage       9.12%   8.50%   -0.62%     
+ Complexity      1170    1113      -57     
============================================
  Files            701     707       +6     
  Lines          45281   45450     +169     
  Branches       10851   10886      +35     
============================================
- Hits            4131    3867     -264     
- Misses         40497   41009     +512     
+ Partials         653     574      -79     

☔ 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.

DYNAMIC_CREATION,
AUTOSAVE,
ALLOW_OVERPICK,
CYCLE_COUNT,
Copy link
Member Author

Choose a reason for hiding this comment

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

Adding the code to this list makes it configurable on locations/locationtypes. We don't have another way to add the code but hide it from locations and it feels weird to exclude it from a generic list() of all values in the enum.

We should probably have a boolean field or a listLocationActivityCodes() method but I wanted to keep this PR small so left it as is. We probably do want to support disabling CC on certain locations anyways, not that we have a use for doing so now.

]
}

static listCycleCountReasonCodes() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

if on cycle count we were previously using the listInventoryAdjustmentReasonCodes, shouldn't we just merge the listInventoryAdjustmentReasonCodes with additional activitiy codes here?
Unless you did it intentionally to repeat some of them just to keep it more maintainable and not having to rely on listInventoryAdjustmentReasonCodes in the future?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I considered doing this but I wanted to avoid the case where in the future we add a reason code to inventory adjustment that we don't want in cycle count. Just because they're the same, doesn't mean they'll stay that way.

But if we assume that a cycle count should always have all the inventory adjustment reason codes, then yes it makes sense to merge them. I can ask Manon

@ewaterman ewaterman merged commit 1263553 into develop Oct 30, 2025
7 checks passed
@ewaterman ewaterman deleted the ft/OBPIH-7346-more-cc-reason-codes branch October 30, 2025 21:20
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 domain: frontend Changes or discussions relating to the frontend UI domain: l10n Changes or discussions relating to localization & Internationalization type: feature A new piece of functionality for the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants