Open alexgleason opened 6 years ago
I think a while ago we discussed having the "edit order" feature essentially be a "cancel order + submit new order " 2 in 1. Any reason to not move forward with that idea?
Any reason to not move forward with that idea?
Time. As the codebase gets increasingly more complex I'm feeling increasingly concerned about it crashing in undefined ways unless I really put effort into writing tests. I'd rather not write and test a whole feature unless we know it's the best way to handle it. There's a workaround for the users right now: they can cancel an order and create a new one. So I'm not feeling compelled to add something that could potentially break on them unless we think it all the way through.
There is a whole category of tests that still needs to be written.
Good point, a user can just cancel and resubmit an order themselves.This is probably fine for now.
I think the latter might be much easier? As in, cancel the first order early and then create and then edit a new order based on the old one?
On Sat, Jan 20, 2018 at 6:39 PM Alex Gleason notifications@github.com wrote:
If the user submits an order and then wants some aspect of it changed, we cannot let them simply change it in the database without keeping track of the changes made. That makes implementing the feature non-trivial.
For example, say Rob places an order for plot 7. He asks them to pick grapes and onions. A week later, he modifies the order and removes onions from it. The next day he calls GardenHub in a rage asking why they picked his onions. They review the order to see that onions aren't listed, so it looks like it's the picker's fault.
To avoid this we need some way to preserve the history of an order, or to facilitate the creation of new orders based on old orders under the guise of "editing" an order.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HarvestHub/GardenHub/issues/92, or mute the thread https://github.com/notifications/unsubscribe-auth/AeWykXk9zhkZCpBtenzmk_d7gxkLWSUTks5tMnlBgaJpZM4RloZG .
If the user submits an order and then wants some aspect of it changed, we cannot let them simply change it in the database without keeping track of the changes made. That makes implementing the feature non-trivial.
For example, say Rob places an order for plot 7. He asks them to pick grapes and onions. A week later, he modifies the order and removes onions from it. The next day he calls GardenHub in a rage asking why they picked his onions. They review the order to see that onions aren't listed, so it looks like it's the picker's fault.
To avoid this we need some way to preserve the history of an order, or to facilitate the creation of new orders based on old orders under the guise of "editing" an order.