- Issue created by @Anybody
- Status changed to Needs review
about 1 year ago 10:37am 16 August 2023 - 🇩🇪Germany Anybody Porta Westfalica
We should say it the other way around:
We shouldn't disallow to cancel a completed order!
- last update
about 1 year ago 774 pass, 4 fail - @anybody opened merge request.
- 🇩🇪Germany Anybody Porta Westfalica
Of course, I can do that and also thought about it, but I created the issue as I think it might be worth discussing, if this isn't kind of wrong currently and would also be helpful for other Drupal Commerce users.
- Status changed to Closed: duplicate
about 1 year ago 7:18pm 16 August 2023 - 🇳🇴Norway zaporylie
From my personal point of view, the introduction of the completed => cancel transition would open the Pandora box of bugs.
The reason for that is that currently Completed is defined as the final state of the state machine. The proposed change would change the definition of such a state to non-final while some operations done toward final states can't be reverted.
I am closing this issue as a duplicate as per 💬 Impossible to cancel an order Fixed and recommend going there in case the discussion should be reopened.
- 🇩🇪Germany Anybody Porta Westfalica
Thanks for the feedback @zaporylie I totally understand that point from the technical point. Still from the user / shop owner perspective I think differently, so perhaps the correct solution would be to have a different ending state like "annulled" (sorry I had to find a different matching word, might not be the right one in English). That wouldn't allow further transitions out.
Still it's the real world, I think...
- 🇳🇴Norway zaporylie
I am also basing it on a real-world example :) We can't allow our merchants to cancel something that has already been declared completed. To us, it is because it means:
- payment was already captured (can't be canceled)
- consignment was created and the courier is on their way
- invoice/receipt was issued and it is an accounting document that cannot be deleted or modified.Having a new state added after "completed" would make it impossible to revert any of these actions but we would give the merchant a false hope that they can. And the limitation here would be the law - one would argue that's a real-world thing... I dunno ;)
- 🇩🇪Germany Anybody Porta Westfalica
Haha thank you @zaporylie - nice discussion ;) There's a workaround in #5 so I'm fine with this.
From my perspective, there are good reasons from both sides, but you may see it differently. We can also wait for the third, fourth, ... issue to be opened on this topic, perhaps that someone agrees that "Complete" isn't the only "End". Until that let's be happy with what we have.
Thank you.
- 🇳🇴Norway zaporylie
I do believe there's a place for that "feature" as Drupal/Commerce is used and abused to satisfy many different scenarios, not only for developing straightforward and law-compliant e-commerce projects ;) However, the risk of introducing regression is not worth pursuing the path of altering existing workflows. I believe this could be a nice addition though, either added in contrib or order workflows extended with new workflows directly in the commerce codebase (however I'd prefer contrib tbh).