commercetools / nodejs

Everything related to the Node.js ecosystem for the commercetools platform.
https://commercetools.github.io/nodejs/
MIT License
75 stars 70 forks source link

sync-actions: Order number action not generated #1780

Closed rasmusbe closed 1 year ago

rasmusbe commented 2 years ago

Description

When setting order number to an order no action is generated Example:

const {body: order}  = await ctClient
        .orders()
        .withId({ID: "XXX"})
        .get()
        .execute();

    const newOrder = {...order};

    newOrder.orderNumber = "12345";

    console.log(`Original order number: ${order.orderNumber || "N/A"}`);
    console.log(`New order number: ${newOrder.orderNumber || "N/A"}`);

    const syncActions = createSyncOrders().buildActions(newOrder, order);
    console.log(syncActions);

Expected Behavior

syncActions should contain the setOrderNumber action

Current Behavior

syncActions is empty

Context

We're setting some initial statuses and order number in an extension and right now we can set the statuses with sync-actions library but the order number is not set.

rasmusbe commented 2 years ago

Anyone?

ashishhk commented 2 years ago

Hello, my apologies for the delay in response, We'll take a look at the issue and get back to you.

VineetKumarKushwaha commented 2 years ago

Looks like we don't support the setOrderNumber for now. @ashishhk We need to implement it support it.

ashishhk commented 2 years ago

@rasmusbe do you still need it ?

rasmusbe commented 2 years ago

It would make sense to include it, but I made my own solution in the customers project.