solidusio / solidusio/solidus

Inventory units stay `on_hand` after an order is canceled

Open
#3,719 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

changelog:solidus_core
Dominant language
Ruby
Stars
5.3k
Forks
1.4k
Avg merge
1d 22h
Merged PRs (30d)
62

Description

Is your feature request related to a problem? Please describe.

When I cancel and order, the inventory units remain on_hand

# Canceled order
order.inventory_units.pluck(:state) => ["on_hand"]

Steps to recreate

  • Create an order and complete it
  • Cancel the order by clicking the "Cancel" button
  • Notice that the order state is canceled, the shipment state it canceled, but the inventory units states remain on_hand (see screenshot below)

Describe the solution you'd like

When I cancel an order, the inventory units state should also change to canceled

# Desired return for canceled order
order.inventory_units.pluck(:state) => ["canceled"]`

Describe alternatives you've considered

Additional context

The issue we've specifically had has been with our warehouse system. The inventory units have to be canceled so our CSRs have to cancel and order, and cancel all the items under the "Cancel Items" tab. But it does seem strange that when you cancel an order the inventory units are not also canceled. We set the shipment state to cancelled so I would assume we do the same for the inventory units.
cancelled-order

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.

Research direction

Start by tracing the order-cancellation flow and comparing how shipment and inventory-unit states are handled. Reproduce the cancellation scenario, then verify that canceling an order leaves its inventory units in the canceled state while preserving the existing canceled order and shipment states.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.