Resolving conflicts between lists, maps, sets, and arrays is often more complicated than simply picking one version over another. ATG Merchandising assists with resolving these collection property conflicts by suggesting a combination of the two versions. You can then choose between the original version, your version, the version from the other project, and the suggested combination. If none of the options are perfect, you can 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 Combined Changes column is blank for other property types. If there are no collection properties in conflict, then the Combined Changes column does not appear.
The following sections describe how ATG Merchandising determines the combined changes:
How Collection Values Are Combined
ATG Merchandising uses a standard differencing algorithm to determine the differences between two collections. The process goes through the following steps:
First, it compares Their Version to the Original Version and finds the differences.
Second, it compares Your Version to the Original Version and finds the differences.
Finally, it combines the two sets of differences and applies them to the original value to obtain the value in the Combined Changes column.
A few additional rules govern the final outcome:
Changed, reordered, and added items in either project’s collection (theirs or yours) are moved to the top of the suggested combination.
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 Customizing 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, ATG Merchandising only has to consider additions and removals to create a suggestion. If both projects add or remove the same item, then the added or removed item appears only once in the combined list. Added items are displayed at the top of the combined changes and removed items are shown at the bottom with a strike through the value.
The following examples illustrate how sets are combined:
Conflict Description | Original | Their Version | Your Version | Combined Changes |
---|---|---|---|---|
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 Added items are added and removed items are removed. | Blue | Blue | Blue | *Yellow |
Note: The table above displays the actual value of the combined sets and does not show the removed items. In ATG Merchandising, removed items are displayed at the bottom of the combined changes with a strike through the name.
Maps
Maps are collections that contain key and value pairs that map one value to another, such as a list of sizes and their numeric equivalent. Changes to maps can include:
Adding key and value pairs
Maps do not allow duplicate keys, so if both projects add the same key and value pair to the map, then it is added only once. If the two projects add the same key but with different values, such as M = 6-8 and M = 8-10, then your changes take precedence.
Editing the key or the value in an existing key and value pair
If each project provides a different value for the same key and value pair, then the change from your project takes precedence and is kept in the combined changes.
Removing key and value pairs
The following table provides some examples of how changes to map items are combined:
Conflict Description | Original | Their Version | Your Version | Combined Changes |
---|---|---|---|---|
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 Customizing 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)* |
Note: The table above shows the actual value of the combined changes and does not show the removed items. In ATG Merchandising, removed items are displayed at the bottom of the combined changes with a strike through the name.
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 ATG 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 the differencing algorithm calculates reordering.
The following table provides some examples of how changes to list and arrays are combined:
Conflict Description | Original | Their Version | Your Version | Combined Changes |
---|---|---|---|---|
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 the differencing algorithm 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 Customizing 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* |
Note: In the table above, removed items are not shown in the combined changes. In ATG Merchandising, removed items are displayed at the bottom of the combined changes with a strike through the name.
Maximum Collection Size for Combining Changes
If there is a very large collection value, ATG 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 combined changes are not suggested because they cannot be displayed completely. If you want ATG Merchandising to suggest changes for collections larger than the display limit, you can edit the setting that controls the maximum number of items that can be combined. You can also change the display limit. See Customizing Conflict Resolution for Collection Properties.