Openfoodnetwork: Can't change shipping method (editing orders in BO)

Created on 28 Jun 2020  路  4Comments  路  Source: openfoodfoundation/openfoodnetwork

Description


While editing a placed order in the backoffice, it's not possible to change it's shipping method: changes are not saved and shipping fees and shipping state are not updated. This was first reported here:
https://openfoodnetwork.slack.com/archives/CDLKH9MM0/p1593360082169900

This bug was reproduced in all staging-servers which have v3 (FR, UK, AU) but not in v2.1 (ES).

Expected Behavior

Changing the shipment method should be possible in the backoffice, after the order was placed; Where applicable, shipping fees and shipping state should be updated automatically, after the change was made.

Actual Behaviour

Changes in shipping method are not effective, i.e. it's not possible to change shipping methods in the backoffice.

Steps to Reproduce




  1. Log in as (super)admin in staging-servers FR, UK, AU
  2. Go to orders, and proceed to edit one
  3. Try to change the shipment method of that order
    4.

Animated Gif/Screenshot


delivery_method_not_saved.gif

Workaround

-

Severity

bug-s2: a non-critical feature is broken, no workaround

Your Environment

  • Version used:
  • Browser name and version:
  • Operating System and version (desktop or mobile):

Possible Fix

bug-s2 v3-regression

All 4 comments

@filipefurtad0 I see you've put this in dev. Is it because it is taking care of in another PR? Otherwise I think the correct column is dev-ready.

Thanks @RachL, moved to dev-ready.

This is a bug in shipment.refresh_rates, I can replicate this in v2.9.9 locally. I dont see this in 2.10 in staging katuma though, but I do see it locally if I copy the katuma db to my local and run 2.9.9 on it.
I need to investigate further to understand where was this problem introduced exactly.
This will require a fix in the shipment still in spree, so I will couple this fix with at least part of the closely related https://github.com/openfoodfoundation/openfoodnetwork/issues/5690

ok, this is a regression for sure, this is a spree 2.1 issue https://github.com/spree/spree/pull/3766

Introduced here in spree 2.1:
https://github.com/openfoodfoundation/spree/commit/8f3c82c04b7c3735e9e6d523b366ea3c2dea34a7

And then fixed in spree 2.2 here:
https://github.com/openfoodfoundation/spree/commit/a4622ee13a723f0dba2943967b445b9989f67fb2

I'll get this fixed tomorrow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Matt-Yorkley picture Matt-Yorkley  路  3Comments

shen-sat picture shen-sat  路  3Comments

sauloperez picture sauloperez  路  3Comments

andrewpbrett picture andrewpbrett  路  3Comments

filipefurtad0 picture filipefurtad0  路  3Comments