When a purchase is canceled, the purchase requests related update their states to ‘exception’, but if the purchase state is set back to ‘draft’, the purchase request state does not get updated anymore.
1 - Create a purchase from a purchase request.
2 - Cancel the created purchase.
3 - Set the purchase state back to draft.
One option is to update the purchase request state when the purchase is set to draft as it’s done on ‘cancel’ method.
But on second thought, I’m not sure if the user should be allowed to set the purchase state back to draft, because if it happens and previously someone handled the purchase request exception, it can derive on two equal purchases.