rubyforgood / rubyforgood/human-essentials

Account for allocated vs unallocated inventory

Open
#5,667 2 comments 0 reactions 1 assignee View on GitHub

@armahillo is already working on this.

Since Aug 28, 2026.

Difficulty—Advanced Ruby for Good 2026 DC
Dominant language
Ruby
Stars
593
Forks
593
Avg merge
4d 22h
Merged PRs (30d)
41

Description

This issue is to track exploration around this whole problem domain, so that we have some place to take notes and link PRs against. Any work we do immediately will need to have a neutral or considered impact on users.


  • Architecture design of the event level tracking of allocated
  • Looking at reports for allocated inventory
  • Maybe this only matters for audits
  • Make sure people are marking their distributions as "completed" -- encourage them, show them the consequences of not doing it
  • Lift up actions into the main distribution row -- button for "complete"

Survey current state of world

  • How many / how often / how recent are incomplete distributions?

Architecture design of the event level tracking of allocated

  • Add a new datapoint of allocated inventory to events
  • Show unallocated everywhere we currently show quantities

Fix audits/adjustments:

  • In Audit, give error if they adjust the inventory to below allocated total
  • In Adjustments, give error if they adjust the inventory to below the allocated total

Improve distribution completion compliance

  • Show a persistent non-dismissable banner when there are incomplete distributions past their estimated distribution date
  • Make it easy to mark distributions as complete by bringing the button onto the distribution list page

Comment from CL:

  1. I worry that we're setting ourselves up for a whole lot of pain to support what sounds like a pretty non-standard business practice. 2. Some of the things in the above will end up breaking the system if, for example, they have a theft.

Straw Man from CL:

Simplest? Way to handle this As much as possible restrict changes to just the audit process

On “New Audit”

Give a strong suggestion that they complete any distributions that have “left the building” as far as auditing is confined.

On saved audits:

When we have a saved-in-progress audit

I believe we show the Quantity in Records. This should show “Unallocated”. TBD: also show “allocated” as the number of that item in distributions that have not been completed, and perhaps a “Physical expected” which would be the sum

Warn them again on confirming?

Similar changes on confirmed audits

On finalizing audit:

Have a Big Ol’ “You must confirm that all distributions that have “left the building” are marked complete before finalizing the audit, or your new inventory available for allocation will be wrong,
give a list of all the incomplete distributions
Allow them to mark them all complete with 1 button or to handle them individually (possibly by going back to the distributions list).
If there are any incomplete distributions, they have to say: “I acknowledge that the items earmarked for not-completed distributions are included in the physical counts for this audit”;
Then, when they hit the final finalize, the new values in the inventory will be calculated to be the physical values - the earmarked values.

Historical audits

What are the implications for looking at historical audits — not just the ones we have now, but the new ones looking back?

We’ll want to have a “physical” column, an “unallocated in records” and a “allocated in records” Maybe put a “Current” on those, to keep it clear.

We'll also want a disclaimer re before we implement this.

Impact:

Maybe new fields on Audit, maybe not?

At the end of the day, all the inventory numbers are still unallocated.

Does that solve the problem?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.