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
Make edit order page work even if inventory_items dont have a corresponding line_item in the order #5253
Conversation
…ove incomplete order spec to a specific context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work refactoring the specs, @luisramos0! 🎉
the easiest might be that the tester asks you to do so 🤷 |
Hi @luisramos0 ! Thank you so much for access to the FR server and all the help with the SQL commands for the table queries. Amazing stuff. Here is a description of the process. I verified the bug in katuma- and fr-staging. Then, after staging this PR, proceeded as follows:
So, two line items visible, 336 and 337, variants 3106 and 3104, respectively.
It is indeed possible to edit the order. However I expected the remaining item to appear. Instead, none appears: Shipping the order, I get the following confirmation email, where both items are shown: However, on the customers side, the order appears as it should - with only the expected item remaining So, in summary:
However, there are discrepancies:
I'm labelling this w/ feedback needed. |
Nice testing! We are testing a data inconsistency scenario in itself. So, not all things will match... we are not fixing the root cause here. The customer is seeing the correct info because that page is looking at the line items table 👍 Anyway, this is a little better than without the PR, isn't it? One of the now possible solutions here is to cancel the order. |
Hey @luisramos0 , Thank you for your feedback! Sure, definitively much better this way. I was wondering why the remaining line item did not show up it in the admin page, so I decided to check somewhere else, how it behaved - hopefully it also helps in improving this. I am happy that it's merged and on time for the release 🎉 |
yes, fantastic testing 👏 |
ok Filipe, I have found why you were not seeing the other line item, that is fixed here: |
Nice! Thank you Luis 👍 |
What? Why?
Improves #4186 as the user will be able to use the edit order page without errors.
The data inconsistency and the underlying problem remains unknown and unresolved.
I have done a big refactoring of order_spec, it was needing one! The actual change is very small.
What should we test?
I can create the situation in 4186 by deleting the line item of an order in the database and keeping the inventory item in there but I am not sure how to do it with the app only. So, I am not sure how we should test this manually...
Release notes
Changelog Category: Fixed
Make edit order page work correctly even if the underlying order data is not consistent in terms of inventory items and line items.