commercetools / commercetools-sync-java

Java library for importing and syncing (taking care of changes) data into one or more commercetools projects from external data files or from another commercetools project.
https://commercetools.github.io/commercetools-sync-java
Apache License 2.0
32 stars 37 forks source link

Update jvm-sdk to v1.46.0 which includes update actions for setting custom fields to accept empty array values #430

Closed JudeNiroshan closed 5 years ago

JudeNiroshan commented 5 years ago

Description

As a sync-java user, I want:

  1. set empty array as a custom field value in the source project and run the sync process without failures ... so that:
  2. target project also has the empty array values for custom fields

Current Behaviour

If the source project has a custom field for price with empty array as the value, after the running the sync-java, in the target project completely removed the custom field.

It should not remove the custom field in the target project.

Expected Behaviour

When the source project has a product variant with custom price field that has an empty array as the value, target project should also has the empty array as the value for the custom price field.

Context

This caused for the error from platform indicating that "trying to modify an attribute which does not exists". Because in the target project, instead of empty array, sync-java removes the attribute.

Possible Solution

Found the problem is because the jvm-sdk has excluded the empty arrays as the value for price custom fields. This has been fixed in the jvm-sdk. So, we need to update our dependency to jvm-sdk v1.46.0

https://github.com/commercetools/commercetools-jvm-sdk/releases/tag/v1.46.0

JudeNiroshan commented 5 years ago

https://github.com/commercetools/commercetools-sync-java/pull/431

heshamMassoud commented 5 years ago

Hi @JudeNiroshan we only close issues when the fix they address is already released. We use the label merged-to-master for fixes which are merged to master but not released yet. Therefore, I'll reopen this one.

heshamMassoud commented 5 years ago

released in 1.4.1.