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

BOM: Deleting last item (trash-bin icon and selecting/deleting) leads to an empty order #8131

Closed
filipefurtad0 opened this issue Sep 3, 2021 · 7 comments · Fixed by #8294
Assignees
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.

Comments

@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Sep 3, 2021

Description

Related to #7627
Related to #7637
Follow-up from #8040

Please note that this bug can be addressed together with #7637 or separately.

There were two missing scenarios which led to empty orders as well; while on the BOM it is possible to delete the last item of an order by:

Expected Behavior

Updated

Clicking the trash icon or selecting on last item of an order and using the "Delete Selected" button:

  • should display a modal text similar to the one implemented by Prevent removing last item in order #8040 but changing the text to "deleting this item will cancel the order as it is the last line item, do you wish to proceed: yes/no".
  • selecting "yes" should cancel the order -> changing the order status to cancelled and shipment status to none

Actual Behaviour

While on the BOM it is possible to delete the last item of an order by clicking the trash-bin icon and by selecting one or more items and deleting via the global action button "Delete Selected"

Steps to Reproduce

As admin:

  1. Visit /admin/orders/bulk_management
  2. Click the trash-bin icon to delete the last item of an order

Animated Gif/Screenshot

Peek 2021-09-03 09-16

Workaround

  • Edit the order and add items back to the order (reverses the deletion and makes the order accessible to the custumer)
  • Manually cancel the order on the respective order edit page

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

  • Version used: v4.0.1
  • Browser name and version: Firefox 90
  • Operating System and version (desktop or mobile): Ubuntu 20.04

Possible Fix

See Expected Behavior section.

@filipefurtad0 filipefurtad0 added bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. feedback-needed labels Sep 3, 2021
@RachL
Copy link
Contributor

RachL commented Sep 3, 2021

@filipefurtad0 thanks for opening the issue 🙏

My 2 cents:

  • Proposal 1 is mine so I won't comment :D

  • Proposal 2: If we go with this option I think we need a text somewhere explaining why the button does not appear for some orders otherwise people will just contact support.

  • Proposal 3: I did proposal 1 because I find it a bit annoying for a user that has a lot of orders in this case to be prevented to do an action. If they really want to delete the item, they need to 1. click on the modal to close it 2. click on the button to edit the order - but they need to think about opening the page in a new tab to avoid loosing all the filters they have used on the BOM page and 3. Cancel the order.
    When you are a big hub with let's say 20 orders in this case, it makes a lot of steps...

@jaycmb
Copy link
Collaborator

jaycmb commented Sep 3, 2021

Agree on @RachL comments.

That´s why by

makes sense to change the order status to cancelled (and shipment status to none) and save the extra steps for the user, but if we do so then in my opinion this same logic should also apply to the order page

I meant let´s change the logic on the order page likewise to

Proposal 1) clicking the trash icon on last item of an order -> change the order status to cancelled (and shipment status to none), changing the a modal text from what has been implemented by #8040 to "deleting this item will cancel the order as it is the last line item, do you wish to proceed: yes/no".

Proposal 2: If we go with this option I think we need a text somewhere explaining why the button does not appear for some orders otherwise people will just contact support.

Yes. Usability wise I think proposal 2 still makes people doing the step via the individual orders pages.
By Proposal 1 we d offer an option to delete orders on bulk order management.

Edit: Just noticed, when multi-selecting orders and deleting via the global action button -> this also leaves empty complete orders
image

@filipefurtad0 filipefurtad0 changed the title BOM: Deleting last item (trash-bin icon) leads to an empty order BOM: Deleting last item (trash-bin icon and selecting/deleting) leads to an empty order Sep 3, 2021
@filipefurtad0
Copy link
Contributor Author

Thanks for feedback! Updated the issue accordingly.

@filipefurtad0
Copy link
Contributor Author

when multi-selecting orders and deleting via the global action button

This is issue #7637

@guidoDutra
Copy link
Contributor

Hello, can I get assigned to this? I'm working on a fix for this and #7637

@RachL
Copy link
Contributor

RachL commented Sep 22, 2021

Canada is having some issues with the fact that cancelling orders sends an email to the customers. They are about to create an issue for this. We need to be careful in which order we will merge the PR.

@guidoDutra
Copy link
Contributor

@RachL I saw the piece of code that does that, it probably won't cause any conflcts with my PR :) I could also pick that up depending on how it goes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants