content: consumables count down when a custody hold ends (shelf.nu#2800) - #227
Conversation
Triggered by: Shelf-nu/shelf.nu#2800 Consumption type used to be honored only at booking check-in, so releasing custody on a ONE_WAY consumable handed every unit back to the pool and the total never moved. shelf.nu#2800 derives the disposition from the asset row, so a consumable's units are consumed instead, with an optional split for whatever came back unused. The KB stated the old behaviour outright ('Releasing custody, fully or partially, returns those units to the available pool'). Corrected here, along with the mobile section: the outcome is decided server-side, so the live Companion build consumes too while still labelling the action 'release'. Also closes a carried-over follow-up: an 'Editing stock in bulk' section on the same article, held back while PR #215 owned the file.
|
Warning Review limit reached
Next review available in: 56 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Preview deployment |
Triggered by
Product change summary
consumptionTypewas honored on exactly one path: booking check-in. The direct custody path never read it, so releasing a hold on aONE_WAYconsumable handed every unit back to the available pool,Asset.quantitynever moved, and the workspace's stock figure drifted further from reality with every use. The UI matched, offering only a "Release" button.#2800 derives the outcome inside
releaseQuantityfrom the locked asset row. On a consumable the units are consumed, the total is decremented, and an explicit split lets an operator hand back whatever was not used. The custody row's action reads Mark as consumed.TWO_WAYand legacy assets are byte-for-byte unchanged, and the server rejects a consume on them.Deployed: the Deploy workflow for merge commit
36fcdf08completed successfully at 06:32Z today.Content changes
Factual corrections
content/knowledge-base/quantity-tracked-assets-and-consumables.mdx— the Quantity-aware custody section stated the pre-fix behavior as a rule: "Releasing custody, fully or partially, returns those units to the available pool." Replaced with two sub-sections, one per consumption type, covering the Mark as consumed action, the two-field dialog, the permanence of the used-up count, the activity entry, and the low-stock interaction.content/knowledge-base/quantity-tracked-assets-and-consumables.mdx— the mobile section said "Tap a holder's custody row to release units back to the pool." Now inaccurate for consumables. See the Companion note under Review notes.content/knowledge-base/quantity-tracked-assets-and-consumables.mdx— "Used up (one-way)" described the drop as happening "when the booking is checked in". That was the whole defect. Now stated as applying on both routes stock leaves by.content/features/consumables-tracking.mdx— "release any portion back" was a blanket claim across both consumption types.content/features/custody.mdx— same blanket "assign or release any quantity" claim in the Quantity-Aware Custody section.Content enhancements
content/glossary/quantity-tracked-assets.mdx— this page already claimed "Consumables reduce permanently when handed out." It was aspirational until this fix and is now true, so it is tightened with the specifics rather than corrected.content/knowledge-base/quantity-tracked-assets-and-consumables.mdx— "Every quantity change is logged" now includes the custody consume, and notes that consumed and returned units are logged separately.content/features/consumables-tracking.mdx— same addition to "Every stock change is on the record".content/knowledge-base/quantity-tracked-assets-and-consumables.mdx— new Editing stock in bulk section. Carried-over follow-up, held back since 2026-08-03 while PR content: pooled stock: booking availability per dates, and low-stock alerting (shelf.nu#2770, #2775, #2780) #215 owned this file. Written against today's behavior: Import-ready carries all four quantity columns, so the manual pass the follow-up described now applies to Standard exports only.New content
content/updates/consumables-consume-on-custody-release.mdx— changelog entry.Review notes
consumedfield. The service computesconsumed ?? (canConsume ? quantity : 0), so a release from today's installed app fully consumes a consumable. The KB says the outcome follows the asset rather than the device, and that the app's wording and its partial field catch up in a future release. Both halves are true today.Screenshots still needed (manual capture required)
content/knowledge-base/quantity-tracked-assets-and-consumables.mdx— the Mark as consumed dialog. The pipeline was run: the demo workspace has two quantity-tracked assets, both returnable and neither in custody, so there is no consumable custody row to shoot. Capturing it means creating aONE_WAYasset and assigning custody in the shared demo workspace, which I did not do unattended. The dialog can be opened without submitting, so this is a quick manual capture once such an asset exists.Impact scope
Generated by Shelf Content Intelligence — PR→Website Sync