In the following features, Gearset has to determine which metadata items in the first comparison result table are essentially the same for selection in a subsequent comparison result:
When we do this, there are metadata items with distinct difference types that we treat as the same change that users want to identify as the same.
The behavior is different for different metadata types:
profile and permissions,
custom object and subcomponents, and
all other metadata types
⚠️ Note: This behavior changed in December 2021, so historical comparisons may behave slightly differently.
Profile and permissions
For profile and permission metadata, the difference type (e.g. New vs. Changed) is treated as equivalent except when it’s a deleted permission, or if the change is to the parent profile itself. Parent and child changes are treated independently.
Rows in the original comparison result | Rows in the next comparison result | Is the metadata included in the next result? |
new or changed permissions | new or changed permissions | Yes |
new or changed permissions | deleted permissions | No |
new or changed or deleted permissions | new or changed or deleted parent profile | No |
new or changed or deleted parent profile | new or changed or deleted permissions | No |
Example permission scenario
Imagine you have a git to git comparison that shows a field permission A as New
.
When cloning the package you choose a git to org environment to compare, and this results in a field permission A showing up as Different
(this can happen if the field permission already exists in the target org).
In this case this field permission A from the second comparison will get included for deployment, even though the difference type is distinct (New
versus Different
)
Custom object and subcomponents
Custom object subcomponents (like fields, record types, etc.) are also compared independently of their parent objects. Subcomponent changes are matched across comparisons as long as the name is the same.
Rows in the original comparison result | Rows in the next comparison result | Is the metadata included in the next result? |
new or changed or deleted subcomponents | new or changed or deleted subcomponents | Yes |
new or changed or deleted subcomponents | new parent custom object | Yes |
new or changed or deleted subcomponents | changed or deleted parent custom object | No |
new parent custom object | new or changed or deleted subcomponents | Yes |
changed or deleted parent custom object | new or changed or deleted subcomponents | No |
new or changed custom object | new or changed custom object | Yes |
new or changed custom object | deleted custom object | No |
For reference, here are the subcomponents type of custom object:
CustomField
BusinessProcess
Index
ListView
NamedFilter
RecordType
SharingReason
ValidationRule
WebLink
CompactLayout
Example scenario: Custom Field
If the custom field is New
in the original comparison and Different
in the next comparison, it will still be selected for deployment in the second comparison.
If the Custom object is New
in the original comparison, but Different
in the next comparison, it will still be selected for deployment in the second comparison.
Other metadata types
All difference types are independent. As long as the metadata item name is the same between comparisons the subsequent comparison will select the metadata item.
Example scenario: Apex Class
A deleted apex class in the original comparison and a new apex class in the next comparison with the same API name will be considered the same and be included in the next comparison and deployment.