Skip to content

Commit 81618aa

Browse files
authored
Fix the issue (#530) ProductSync's publish/unpublish build actions (#533)
* rename buildPublishUpdateAction to buildPublishOrUnpublishUpdateAction, and add unit test before adding functionality. * add a fix to the buildPublishOrUnpublishUpdateAction and cover with new tests. * Use boolean instead of Boolean. * Prepare for the release 1.9.1, && add RELEASE_NOTES.md
1 parent 729a053 commit 81618aa

20 files changed

Lines changed: 464 additions & 61 deletions

File tree

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# commercetools sync
33
[![Build Status](https://travis-ci.org/commercetools/commercetools-sync-java.svg?branch=master)](https://travis-ci.org/commercetools/commercetools-sync-java)
44
[![codecov](https://codecov.io/gh/commercetools/commercetools-sync-java/branch/master/graph/badge.svg)](https://codecov.io/gh/commercetools/commercetools-sync-java)
5-
[![Benchmarks 1.9.0](https://img.shields.io/badge/Benchmarks-1.9.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
5+
[![Benchmarks 1.9.1](https://img.shields.io/badge/Benchmarks-1.9.1-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
66
[![Download](https://api.bintray.com/packages/commercetools/maven/commercetools-sync-java/images/download.svg) ](https://bintray.com/commercetools/maven/commercetools-sync-java/_latestVersion)
7-
[![Javadoc](http://javadoc-badge.appspot.com/com.commercetools/commercetools-sync-java.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/1.9.0/)
7+
[![Javadoc](http://javadoc-badge.appspot.com/com.commercetools/commercetools-sync-java.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/1.9.1/)
88
[![Known Vulnerabilities](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646/badge.svg)](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646)
99

1010
More at https://commercetools.github.io/commercetools-sync-java
@@ -36,7 +36,7 @@ The library supports synchronising the following entities in commercetools
3636
- [Ivy](#ivy)
3737
- [Roadmap](#roadmap)
3838
- [Release Notes](/docs/RELEASE_NOTES.md)
39-
- [Javadoc](https://commercetools.github.io/commercetools-sync-java/v/1.9.0/)
39+
- [Javadoc](https://commercetools.github.io/commercetools-sync-java/v/1.9.1/)
4040
- [Benchmarks](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
4141

4242
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -78,26 +78,26 @@ Here are the most popular ones:
7878
<dependency>
7979
<groupId>com.commercetools</groupId>
8080
<artifactId>commercetools-sync-java</artifactId>
81-
<version>1.9.0</version>
81+
<version>1.9.1</version>
8282
</dependency>
8383
````
8484

8585
#### Gradle
8686

8787
````groovy
88-
implementation 'com.commercetools:commercetools-sync-java:1.9.0'
88+
implementation 'com.commercetools:commercetools-sync-java:1.9.1'
8989
````
9090

9191
#### SBT
9292

9393
````
94-
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "1.9.0"
94+
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "1.9.1"
9595
````
9696

9797
#### Ivy
9898

9999
````xml
100-
<dependency org="com.commercetools" name="commercetools-sync-java" rev="1.9.0"/>
100+
<dependency org="com.commercetools" name="commercetools-sync-java" rev="1.9.1"/>
101101
````
102102

103103

docs/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# commercetools sync
33
[![Build Status](https://travis-ci.org/commercetools/commercetools-sync-java.svg?branch=master)](https://travis-ci.org/commercetools/commercetools-sync-java)
44
[![codecov](https://codecov.io/gh/commercetools/commercetools-sync-java/branch/master/graph/badge.svg)](https://codecov.io/gh/commercetools/commercetools-sync-java)
5-
[![Benchmarks 1.9.0](https://img.shields.io/badge/Benchmarks-1.9.0-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
5+
[![Benchmarks 1.9.1](https://img.shields.io/badge/Benchmarks-1.9.1-orange.svg)](https://commercetools.github.io/commercetools-sync-java/benchmarks/)
66
[![Download](https://api.bintray.com/packages/commercetools/maven/commercetools-sync-java/images/download.svg) ](https://bintray.com/commercetools/maven/commercetools-sync-java/_latestVersion)
7-
[![Javadoc](http://javadoc-badge.appspot.com/com.commercetools/commercetools-sync-java.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/1.9.0/)
7+
[![Javadoc](http://javadoc-badge.appspot.com/com.commercetools/commercetools-sync-java.svg?label=Javadoc)](https://commercetools.github.io/commercetools-sync-java/v/1.9.1/)
88
[![Known Vulnerabilities](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646/badge.svg)](https://snyk.io/test/github/commercetools/commercetools-sync-java/4b2e26113d591bda158217c5dc1cf80a88665646)
99

1010

@@ -55,18 +55,18 @@ Here are the most popular ones:
5555
<dependency>
5656
<groupId>com.commercetools</groupId>
5757
<artifactId>commercetools-sync-java</artifactId>
58-
<version>1.9.0</version>
58+
<version>1.9.1</version>
5959
</dependency>
6060
````
6161
#### Gradle
6262
````groovy
63-
implementation 'com.commercetools:commercetools-sync-java:1.9.0'
63+
implementation 'com.commercetools:commercetools-sync-java:1.9.1'
6464
````
6565
#### SBT
6666
````
67-
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "1.9.0"
67+
libraryDependencies += "com.commercetools" % "commercetools-sync-java" % "1.9.1"
6868
````
6969
#### Ivy
7070
````xml
71-
<dependency org="com.commercetools" name="commercetools-sync-java" rev="1.9.0"/>
71+
<dependency org="com.commercetools" name="commercetools-sync-java" rev="1.9.1"/>
7272
````

docs/RELEASE_NOTES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@
3535
[Jar](https://bintray.com/commercetools/maven/commercetools-sync-java/1.9.0)
3636
-->
3737

38+
### 1.9.1 - Aug 5, 2020
39+
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/1.9.0...1.9.1) |
40+
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/1.9.1/) |
41+
[Jar](https://bintray.com/commercetools/maven/commercetools-sync-java/1.9.1)
42+
43+
- 🐞 **Bug Fixes** (1)
44+
- **Product Sync** - Fixed a bug in the `ProductSync` related to publish/unpublish of the product update actions,
45+
when a new product draft has publish flag set to true and the existing product is published already then no publish action will be created
46+
which was not correct [#530](https://github.com/commercetools/commercetools-sync-java/issues/530)
47+
3848
### 1.9.0 - July 27, 2020
3949
[Commits](https://github.com/commercetools/commercetools-sync-java/compare/1.8.2...1.9.0) |
4050
[Javadoc](https://commercetools.github.io/commercetools-sync-java/v/1.9.0/) |

docs/usage/CART_DISCOUNT_SYNC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Therefore, in order for the sync to resolve the actual ids of those references i
3636
reference should return its `key`.
3737

3838
**Note**: When syncing from a source commercetools project, you can use this util which this library provides:
39-
[`replaceCartDiscountsReferenceIdsWithKeys`](https://commercetools.github.io/commercetools-sync-java/v/1.9.0/com/commercetools/sync/cartdiscounts/utils/CartDiscountReferenceReplacementUtils.html#replaceCartDiscountsReferenceIdsWithKeys-java.util.List-)
39+
[`replaceCartDiscountsReferenceIdsWithKeys`](https://commercetools.github.io/commercetools-sync-java/v/1.9.1/com/commercetools/sync/cartdiscounts/utils/CartDiscountReferenceReplacementUtils.html#replaceCartDiscountsReferenceIdsWithKeys-java.util.List-)
4040
that replaces the references id fields with keys, in order to make them ready for reference resolution by the sync:
4141
````java
4242
// Puts the keys in the reference id fields to prepare for reference resolution

docs/usage/CATEGORY_SYNC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ otherwise they won't be matched.
3737
reference would return its `key`.
3838

3939
**Note**: When syncing from a source commercetools project, you can use this util which this library provides:
40-
[`replaceCategoriesReferenceIdsWithKeys`](https://commercetools.github.io/commercetools-sync-java/v/1.9.0/com/commercetools/sync/categories/utils/CategoryReferenceReplacementUtils.html#replaceCategoriesReferenceIdsWithKeys-java.util.List-)
40+
[`replaceCategoriesReferenceIdsWithKeys`](https://commercetools.github.io/commercetools-sync-java/v/1.9.1/com/commercetools/sync/categories/utils/CategoryReferenceReplacementUtils.html#replaceCategoriesReferenceIdsWithKeys-java.util.List-)
4141
that replaces the references id fields with keys, in order to make them ready for reference resolution by the sync:
4242
````java
4343
// Puts the keys in the reference id fields to prepare for reference resolution

docs/usage/IMPORTANT_USAGE_TIPS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ productSync.sync(batch1)
3131
By design, scaling the sync process should **not** be done by executing the batches themselves in parallel. However, it can be done either by:
3232

3333
- Changing the number of [max parallel requests](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L116) within the `sphereClient` configuration. It defines how many requests the client can execute in parallel.
34-
- or changing the draft [batch size](https://commercetools.github.io/commercetools-sync-java/v/1.9.0/com/commercetools/sync/commons/BaseSyncOptionsBuilder.html#batchSize-int-). It defines how many drafts can one batch contain.
34+
- or changing the draft [batch size](https://commercetools.github.io/commercetools-sync-java/v/1.9.1/com/commercetools/sync/commons/BaseSyncOptionsBuilder.html#batchSize-int-). It defines how many drafts can one batch contain.
3535

3636
The current overridable default [configuration](https://github.com/commercetools/commercetools-sync-java/tree/master/src/main/java/com/commercetools/sync/commons/utils/ClientConfigurationUtils.java#L45) of the `sphereClient`
3737
is the recommended good balance for stability and performance for the sync process.

docs/usage/INVENTORY_SYNC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ against a [InventoryEntryDraft](https://docs.commercetools.com/http-api-projects
3535
reference would return its `key`.
3636

3737
**Note**: When syncing from a source commercetools project, you can use this util which this library provides:
38-
[`replaceInventoriesReferenceIdsWithKeys`](https://commercetools.github.io/commercetools-sync-java/v/1.9.0/com/commercetools/sync/inventories/utils/InventoryReferenceReplacementUtils.html#replaceInventoriesReferenceIdsWithKeys-java.util.List-)
38+
[`replaceInventoriesReferenceIdsWithKeys`](https://commercetools.github.io/commercetools-sync-java/v/1.9.1/com/commercetools/sync/inventories/utils/InventoryReferenceReplacementUtils.html#replaceInventoriesReferenceIdsWithKeys-java.util.List-)
3939
that replaces the references id fields with keys, in order to make them ready for reference resolution by the sync:
4040
````java
4141
// Puts the keys in the reference id fields to prepare for reference resolution

docs/usage/PRODUCT_SYNC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ order for the sync to resolve the actual ids of those references, those `key`s h
4242
reference would return its `key`.
4343

4444
**Note**: When syncing from a source commercetools project, you can use this util which this library provides:
45-
[`replaceProductsReferenceIdsWithKeys`](https://commercetools.github.io/commercetools-sync-java/v/1.9.0/com/commercetools/sync/products/utils/ProductReferenceReplacementUtils.html#replaceProductsReferenceIdsWithKeys-java.util.List-)
45+
[`replaceProductsReferenceIdsWithKeys`](https://commercetools.github.io/commercetools-sync-java/v/1.9.1/com/commercetools/sync/products/utils/ProductReferenceReplacementUtils.html#replaceProductsReferenceIdsWithKeys-java.util.List-)
4646
that replaces the references id fields with keys, in order to make them ready for reference resolution by the sync:
4747
````java
4848
// Puts the keys in the reference id fields to prepare for reference resolution

docs/usage/PRODUCT_TYPE_SYNC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ references, those `key`s have to be supplied in the following way:
3939
reference would return its `key`.
4040

4141
**Note**: When syncing from a source commercetools project, you can use this util which this library provides:
42-
[`replaceProductTypesReferenceIdsWithKeys`](https://commercetools.github.io/commercetools-sync-java/v/1.9.0/com/commercetools/sync/producttypes/utils/ProductTypeReferenceReplacementUtils.html#replaceProductTypesReferenceIdsWithKeys-java.util.List-)
42+
[`replaceProductTypesReferenceIdsWithKeys`](https://commercetools.github.io/commercetools-sync-java/v/1.9.1/com/commercetools/sync/producttypes/utils/ProductTypeReferenceReplacementUtils.html#replaceProductTypesReferenceIdsWithKeys-java.util.List-)
4343
that replaces the references id fields with keys, in order to make them ready for reference resolution by the sync:
4444
````java
4545
// Puts the keys in the reference id fields to prepare for reference resolution

docs/usage/QUICK_START.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,35 @@
2020
<dependency>
2121
<groupId>com.commercetools.sdk.jvm.core</groupId>
2222
<artifactId>commercetools-models</artifactId>
23-
<version>1.51.0</version>
23+
<version>1.52.0</version>
2424
</dependency>
2525
<dependency>
2626
<groupId>com.commercetools.sdk.jvm.core</groupId>
2727
<artifactId>commercetools-java-client</artifactId>
28-
<version>1.51.0</version>
28+
<version>1.52.0</version>
2929
</dependency>
3030
<dependency>
3131
<groupId>com.commercetools.sdk.jvm.core</groupId>
3232
<artifactId>commercetools-convenience</artifactId>
33-
<version>1.51.0</version>
33+
<version>1.52.0</version>
3434
</dependency>
3535

3636
<!-- Add commercetools-sync-java dependency. -->
3737
<dependency>
3838
<groupId>com.commercetools</groupId>
3939
<artifactId>commercetools-sync-java</artifactId>
40-
<version>1.9.0</version>
40+
<version>1.9.1</version>
4141
</dependency>
4242
````
4343
- For Gradle users:
4444
````groovy
4545
// Add commercetools-jvm-sdk dependencies.
46-
implementation 'com.commercetools.sdk.jvm.core:commercetools-models:1.51.0'
47-
implementation 'com.commercetools.sdk.jvm.core:commercetools-java-client:1.51.0'
48-
implementation 'com.commercetools.sdk.jvm.core:commercetools-convenience:1.51.0'
46+
implementation 'com.commercetools.sdk.jvm.core:commercetools-models:1.52.0'
47+
implementation 'com.commercetools.sdk.jvm.core:commercetools-java-client:1.52.0'
48+
implementation 'com.commercetools.sdk.jvm.core:commercetools-convenience:1.52.0'
4949
5050
// Add commercetools-sync-java dependency.
51-
implementation 'com.commercetools:commercetools-sync-java:1.9.0'
51+
implementation 'com.commercetools:commercetools-sync-java:1.9.1'
5252
````
5353

5454
### 2. Setup Syncing Options
@@ -86,4 +86,4 @@ implementation 'com.commercetools:commercetools-sync-java:1.9.0'
8686
*[Product Sync](PRODUCT_SYNC.md), [ProductType Sync](PRODUCT_TYPE_SYNC.md),
8787
[Category Sync](CATEGORY_SYNC.md), [Inventory Sync](INVENTORY_SYNC.md),
8888
[Type Sync](TYPE_SYNC.md), [CartDiscount Sync](CART_DISCOUNT_SYNC.md),
89-
[TaxCategory Sync](/docs/usage/TAX_CATEGORY_SYNC.md)*
89+
[TaxCategory Sync](/docs/usage/TAX_CATEGORY_SYNC.md), [State Sync](/docs/usage/STATE_SYNC.md)*

0 commit comments

Comments
 (0)