Closed junajan closed 5 years ago
I tried to run again the case without lineItemId
column:
orderNumber,fromState,toState,quantity,_fromStateQty
CT-TESTING-3,Initial,workInProgress,1,1
And now I got an error:
ERR: Required headers missing: 'lineItemId'info: Reading data from stdin...
info: {
"errors": [],
"inserted": [],
"successfullImports": 0
}
Support reference number
SUPPORT-4052
Description
As discussed in the ticket above:
I tried several things in order to update lineItem states and here is what I found: When I tried to import file import.csv with these fields:
It was translated to this json:
Which did not work in Impex nor directly through CLI. Also, no error was thrown. Then I noticed here that we use a field named as "_fromStateQty" https://github.com/commercetools/orders-update
So I tried to run this new version:
And it worked -
lineItem.state
was changed. So it looks like this field is mandatory for changing states.I also tried to make lineItemId UUID empty which gave me this error: https://gist.github.com/junajan/c1626fd74a41318f1792d6604849db1f
And then I tried to remove the whole
lineItemId
column which did not give me any error, but the order-update CLI tool just died.So to wrap it up:
lineItemId
as the update will not work without it