solidus icon indicating copy to clipboard operation
solidus copied to clipboard

Items on Back Order when Track Inventory is false

Open brettallred opened this issue 6 years ago • 4 comments

Steps to reproduce

  • Set config.track_inventory_levels = false
  • Create one or two shipment locations
  • Submit and order for two products or a quantity of two for a single product
  • In the order section, press the Split button
  • Choose a different shipment location or even the same shipment location

Expected behavior

  • Item should be shippable

Actual behavior

  • Item says it is back ordered and you can't get out of that state

System configuration

Solidus Version: 2.6.0

Extensions in use:

gem 'solidus' 
gem 'solidus_auth_devise'
gem 'deface'
gem 'solidus_wishlist', github: 'boomerdigital/solidus_wishlist', branch: 'master'
gem 'solidus_reviews', github: 'solidusio-contrib/solidus_reviews'
gem "searchkick", github: "ankane/searchkick"
gem 'solidus_cmd'

https://gist.github.com/brettallred/fe054c6dd4df820b0a510cbb4872f610

brettallred avatar Aug 01 '18 20:08 brettallred

This exists in Solidus 2.7.0

jacobherrington avatar Oct 01 '18 17:10 jacobherrington

Let me have a look at this one

aitbw avatar Nov 23 '18 14:11 aitbw

Haven't figured this one yet but here's a spec to reproduce the bug without needing to build the sandbox; copy the following snippet between these two lines, and it should fail as expected.

context 'when inventory levels are not being tracked' do
  before do
    Spree::Config[:track_inventory_levels] = false
  end

  after do
    Spree::Config[:track_inventory_levels] = true
  end

  # Regression for https://github.com/solidusio/solidus/issues/2817
  it "should allow me to ship an order's items" do
    visit spree.edit_admin_order_path(order)

    within('tr', text: line_item.sku) { click_icon 'arrows-h' }
    complete_split_to(stock_location2)

    expect(page).to have_css('.shipment', count: 2)
    expect(order.shipments.count).to eq(2)
    expect(page).not_to have_content('Backordered')
    expect(page).to have_content('On hand', count: 2)
  end
end

aitbw avatar Dec 03 '18 17:12 aitbw

I'm able to reproduce this on master and am going to work on knocking this out.

nspinazz89 avatar Sep 18 '19 16:09 nspinazz89