You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In one of our plugins, we partially fulfill and ship order items, but Vendure throws (not return as ErrorResult) an ORDER_STATE_TRANSITION_ERROR when we ship 2 of 3 items of the same order line. The issue is also reproducable via the Admin UI.
To Reproduce
Create a settled order with 1 variant (thus 1 order line) with quantity 3
Create a fulfillment via the Admin UI with quantity 2. This creates a fulfillment in state Pending
Click on mark as shipped on the fulfillment
An ORDER_STATE_TRANSITION_ERROR will be thrown, the order will stay in PaymentSettled and the fulfillment will stay in Pending
Expected behavior
The fulfillment should transition to Shipped
The order should transition to PartiallyShipped
Environment (please complete the following information):
Describe the bug
In one of our plugins, we partially fulfill and ship order items, but Vendure throws (not return as ErrorResult) an
ORDER_STATE_TRANSITION_ERROR
when we ship 2 of 3 items of the same order line. The issue is also reproducable via the Admin UI.To Reproduce
Pending
mark as shipped
on the fulfillmentORDER_STATE_TRANSITION_ERROR
will be thrown, the order will stay inPaymentSettled
and the fulfillment will stay inPending
Expected behavior
Shipped
PartiallyShipped
Environment (please complete the following information):
Additional context
The order doesn't transition to
PartiallyShipped
here, because the function orderItemsArePartiallyShipped returns false. That is because the functiongetOrderLineFulfilmentStates
only returns the states when the fulfillment quantity is equal to the orderLine quantity, which in this case is never: only 2 out of 3 of the same orderline are fulfilledShouldn't it be something like this?
The text was updated successfully, but these errors were encountered: