Skip to content

Conversation

@hagiya0121
Copy link
Contributor

Resolves #5004

Description

In itemized reports, inactive items previously displayed "Unknown" for Total On Hand.
Since items can only be deactivated when their inventory is already 0, the correct value should be 0 instead of "Unknown".
This update removes the "Unknown" fallback in the views and ensures that DistributionItemizedBreakdownService uses a hash with a default value of 0, so inactive items now return 0 instead of nil.
A test has also been added to confirm that inactive items correctly display 0 in reports.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Screenshots

image image

Copy link
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

Passes technical review - over to @awwaiid for functional.

@janeewheatley
Copy link
Collaborator

Passed Functional Testing

  1. log in as [email protected]
  2. click on Reports (Distributions - Itemized)
  3. The value that was previously 'unknown' is now 0 (Adult Briefs Large/X-Large)
image

@janeewheatley janeewheatley merged commit cd8e746 into rubyforgood:main Nov 23, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from レビュー中 to 完了 in OSS Contributions Nov 23, 2025
@hagiya0121 hagiya0121 deleted the chore/5004-inactive-items-total-0 branch November 29, 2025 03:15
@github-actions
Copy link
Contributor

@hagiya0121: Your PR 5004 Show 0 instead of “Unknown” for inactive items in itemized reports is part of today's Human Essentials production release: 2025.11.30.
Thank you very much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Total on Hand is Unknown for inactive Items on Itemized Reports -- should be 0.

4 participants