Resolving conflicts between lists, maps, sets, and arrays is often more complicated than simply picking one version over another, so Merchandising suggests a combination of the two versions. You can choose the original version, your version, the version from the other project, or the suggested combination. If none of the options provides exactly what you want, choose the option closest to your desired value and then modify the asset before advancing the project to the next task.
In the suggested combination:
Added, reordered, and changed items appear at the top and are marked with an asterisk.
Unchanged items appear next in normal text.
Removed items are displayed at the bottom of the list with a strikethrough. These items are shown for your information and are not part of the suggested collection.
The following figure shows an example of a collection property that has a conflict with another project:
Note: Suggested combinations are provided only for collection properties. The Merged Version column is blank for other property types. If there are no collection properties in conflict, then the Merged Version column does not appear.
The sections that follow describe how Merchandising determines the merged changes.
How Collection Values Are Merged
To determine the difference between conflicting collections, Merchandising finds the differences between Their Version and Original Version, then finds the differences between Your Version and Original Version, and finally combines the two sets of differences and applies them to Original version.
These rules determine the final outcome:
Changed, reordered, and added items in either project’s collection (theirs or yours) are moved to the top of the suggested merged version.
When updates to an item in a collection conflict between your version and the other version of the collection, your updates take precedence, unless the item was removed in the other version.
If an item is removed from the collection in one project and changed or reordered in the other, the remove operation overrides the change or reorder operation by default. You can configure this setting. See Conflict Resolution for Collection Properties.
Sets
Sets are not ordered and do not allow duplicates, and are therefore simpler to combine than other types of collections. When versions of sets are combined, Merchandising considers only additions and removals when creating the merged version. If both projects add or remove the same item, then that item appears only once in the merged list.
The following examples illustrate how sets are combined.
In the following table, removed items are not shown in the merged version. In Merchandising, removed items are displayed at the bottom of the Merged Version column with a strike through the name.
Conflict Description | Original | Their Version | Your Version | Merged Version |
---|---|---|---|---|
Two projects add different items Both items are added. | Blue | Blue | Blue | *Yellow |
Two projects remove different items Both items are removed. | Blue | Blue | Green | Green |
Two projects add and remove different items All items marked for add are added and all items marked for removal are removed. | Blue | Blue | Blue | *Yellow |
Maps
Maps are collections that contain key/value pairs that map one value to another, such as a list of sizes and their numeric equivalents. Changes to maps can include:
Adding key/value pairs
Maps do not allow duplicate keys, so if both projects add the same key/value pair to the map, then it is added only once. For example, if your project adds the key value pair M = 6-8 and another project adds the key/value pair M = 8-10, then your changes, M = 6-8, take precedence.
Editing the key or the value in an existing key/value pair
If each project provides a different value for the same key/value pair, then the change from your project takes precedence and is kept in the combined changes. For example, if your project edits the value of the key XL so that XL = 14 and another project edits the key XL so that XL = 16, then your changes take precedence.
Removing key/value pairs
The following table provides some examples of how changes to map items are combined. Removed items are not shown in the merged version. In Merchandising, removed items are displayed at the bottom of the Merged Version column with a strike through the name.
Conflict Description | Original | Their Version | Your Version | Merged Version |
---|---|---|---|---|
One project removes a map item, The removed item is removed and the added item is added. | S (4-6) | S (4-6) | S (4-6) | XL (16-18)* |
One project edits an item, The edited item is updated and the added item is added. | S (4-6) | S (2-4) | S (4-6) | S (2-4)* |
One project edits an item, The item is removed. Note: You can configure whether removed items take precedence over changed items. See Conflict Resolution for Collection Properties. | S (4-6) | S (2-4) | M (8-10) | M (8-10) |
Both projects edit the same item The value in your project is kept. | S (4-6) | S (2-4) | S (2-6) | S (2-6)* |
Each project edits a different item Both changes are kept. | S (4-6) | S (2-4) | S (4-6) | S (2-4)* |
Lists and Arrays
Lists and arrays are collections that contain ordered lists of items and, if you have not prohibited them, can contain the same item multiple times. Changes to lists and arrays can include:
Adding items
Reordering items
Removing items
Adding, reordering, or removing duplicate items (if allowed in your environment)
For information about preventing duplicates, see the Business Control Center Administration and Development Guide.
Note: In some cases, items that were not explicitly changed in either project are marked as changed in the suggested combination because of the way Oracle Commerce Platform calculates reordering.
The following table provides some examples of how changes to lists and arrays are combined. Removed items are not shown in the merged version. In Merchandising, removed items are displayed at the bottom of the Merged Version column with a strike through the name.
Conflict Description | Original | Their Version | Your Version | Merged Version |
---|---|---|---|---|
Two projects reorder items The two list orders are combined. Note: Item B is marked as changed although it appears to be the same in all collections. This is because of the way that Oracle Commerce Platform calculates reordering. | A | C | E | A* |
Two projects add different items to the same location The items are added to the top of the list. | A | A | A | D* |
Two projects add the same item in different locations The item is added twice to the top of the list. Note: If duplicates are prohibited, the item is added only once. | A | A | A | D* |
One project reorders items, the other project removes an item The two list orders are combined and the removed item is removed. Note: You can configure whether removed items take precedence over reordered items. See Conflict Resolution for Collection Properties. | A | B | A | A* |
One project adds items, the other project removes an item The new items are added to the top of the list, and the removed item is removed. | A | A | A | E* |
Maximum Collection Size for Combining Changes
For very large collection values, Merchandising displays only the first 2300 items on the Review Changes page by default. As a result, if any conflicting version contains more items than the display limit allows, then a merged version is not suggested because the combinations cannot be displayed.