medusajs / medusa

Building blocks for digital commerce
https://medusajs.com
MIT License
24.39k stars 2.38k forks source link

Cart without `completed_at` while completed #8111

Closed BorisKamp closed 1 month ago

BorisKamp commented 1 month ago

Hey!

Using Medusa 1.20.6 on production, I have a cart of a user: cart.json

That has no completed_at but the items have a order_id, how is this possible? Because the completed_at is null, this cart stayed in the customers cache but it gave errors because the cart could not be modified.

I want to know how this could have happend to prevent it in the future.

Let me know if I need to provide more info.

adrien2p commented 1 month ago

This sounds difficult to say, especially that the items have an order_id. In the order service, the items gets updated and then the cart gets updated with a new date for the completed at. I would assume that if the items have the order_id it means that nothing went wrong and therefore the update of the cart should have worked.

Would you be able to try on your side and see if that happens again? In the meantime I suggest that you set the completed at by either updating the cart of setting it in the db to solve your customer issue

srindom commented 1 month ago

@BorisKamp have you been able to reproduce this problem?

BorisKamp commented 1 month ago

@srindom not that I know, I will keep an close eye on it to see if it happens again.

srindom commented 1 month ago

Will close this issue for now - if it happens again feel free to re-open with steps to reproduce.