bug on the fulfillmentOrderMove mutation in the new api version (2023-04)

bug on the fulfillmentOrderMove mutation in the new api version (2023-04)

Elimor
Shopify Partner
4 0 1

Hello to you all,

 

We dealt with an issue related to the new order fulfillment process in version 2023-04.

We are using GarphQL to move some items from a FulfillmentOrder object assigned to location 1 to another location.
The issue is described in more detail as follows:
We have an 2 items called 'Test' and 'Other' that exists in three different locations.
In the case of a new order created with 'Test' of quantity 2 and 'Other' of quantity 2, it is assigned to location 1 as the original location.

we are using fulfillmentOrderMove mutation to move one quantity of each item from location 1 to location 2.
There are now two FulfillmentOrders objects, each with 1 quantity of 'Test' item and 1 quantity of 'Other' item and assigned to location 1 and location 2.

The next request causes the bug:
In this case, we are using the fulfillmentOrderMove mutation to move 'Test' item from first two locations to another location (location 3).
It has moved the item successfully, but also shows another item that wasn't present in the previous location, and now we have quantity of 3 items instead of 2 for 'Test' item.

 

the last request that caused the bug:

mutation fulfillmentOrderMove {
  lastRequest:
  fulfillmentOrderMove(
    id:"gid://shopify/FulfillmentOrder/6329453150446",
    newLocationId:"gid://shopify/Location/68571169006" ,
    fulfillmentOrderLineItems: [
      {id: "gid://shopify/FulfillmentOrderLineItem/13480650834158", quantity: 1}])
    {
      movedFulfillmentOrder {
        id,
        lineItems (first:20){
          nodes{
            id,
          inventoryItemId,
          }
        }
      }
      userErrors {
        field
        message
      }
      originalFulfillmentOrder {
        assignedLocation {
          location {
            id
          }
        }
      }
    },
}

As you can see in the following photos, the order object has a quantity of 2 for the 'Test' item, but a fulfillable quantity of 3, and the UI shows 3 quantities for the item instead of 2.

Screen Shot 2023-04-04 at 11.05.23.pngScreen Shot 2023-04-04 at 11.04.21.png

 

Replies 0 (0)