Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep orders with "completed" status in the list of orders #8221

Closed
RachL opened this issue Sep 22, 2021 · 4 comments · Fixed by #8222
Closed

Keep orders with "completed" status in the list of orders #8221

RachL opened this issue Sep 22, 2021 · 4 comments · Fixed by #8222
Assignees
Labels
bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround.

Comments

@RachL
Copy link
Contributor

RachL commented Sep 22, 2021

Description

The scope chosen here : #8148 is too restrictive (stop displaying orders with no line items).

Indeed it applies to both the list of complete orders and the list of uncomplete orders.

As a result if the orders has no line items but as the result of edition after completion of the order, the order is no more accessible through the UI.

Expected Behavior

We need to be able to find orders with no line items and status "completed" or "cancelled".

Actual Behaviour

These orders cannot be found in the UI except the payment method report, which does not contain the order number.

Steps to Reproduce

  1. Create an order
  2. Delete all line items using BOM
  3. see the order does not appear anymore on /admin/orders

Animated Gif/Screenshot

Example with https://openfoodnetwork.ca/admin/orders/R055527651/edit in CA prod

Workaround

If a customer needs a refund, hubs can ask them their order number, but that's not really a workaround

Severity

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

Your Environment

  • Version used: v4.1.2
  • Browser name and version: All
  • Operating System and version (desktop or mobile): Both

Possible fix

All orders with completed or cancelled status should still be visible in the list no matter the content.

@RachL RachL added the bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround. label Sep 22, 2021
@jibees
Copy link
Contributor

jibees commented Sep 23, 2021

Quick questions:

  1. Create an order: for a shopper or an admin?
    --> Both
  2. Delete all line items using BOM: Seems that we can't delete the last item of an order, or am I missing something?

Capture d’écran 2021-09-23 à 09 46 44

--> in the BOM, delete the line item with the bin icon

  1. We need to be able to find orders with no line items and status "completed" or "cancelled": I can see in the code, a FINALIZED_STATES which I can use I guess:
# All the states an order can be in after completing the checkout
FINALIZED_STATES = %w(complete canceled resumed awaiting_return returned).freeze

I'm wondering if this is accurate in our case.

@RachL
Copy link
Contributor Author

RachL commented Sep 23, 2021

We had a quick call with JB to clarify 👍 PR on the way

@jaycmb
Copy link
Collaborator

jaycmb commented Sep 23, 2021

  1. Delete all line items using BOM: Seems that we can't delete the last item of an order, or am I missing something?
    --> in the BOM, delete the line item with the bin icon

This is going to be changed by #8131
And I thought this would also solve the problem of having complete orders without line items?

Or is it needed to keep this functionality? Then #8131 needs an update?
I feel like we have too many related issues open around this topic, would be good to define the ideal state?

@RachL
Copy link
Contributor Author

RachL commented Sep 23, 2021

@jaycmb long story short, there is no need to update 8131 we still need it as is. The two topics are not really linked.

#8131 will still enable to delete the item if the order is cancelled, what this issue fixes is that the cancel order can still be viewed in the list of orders. Currently it can't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants