In Gearset, you can easily rollback deployments that you have run and return the items deployed to the previous state.
Gearset does this by running a comparison between the stored snapshot before deployment and the org's current live state. This will highlight what changes have been made since the snapshot, and let you selectively roll back any of the changes.
Sometimes the number of changes in the rollback comparison will be less than the deployment item count, and this articles explains several reasons why this would happen.
Once items are selected to deploy in the metadata comparison results screen, there are a few steps before the changes take effect in the target org. If the selected metadata items are not deployed to the target org, then the rollback comparison will not show that metadata item as changed and therefore not allow you roll back that change.
Fundamentally, if a change in metadata has not occurred in the target org, then there is nothing for Gearset to rollback.
Gearset's problem analyzers are suggestions that could remove metadata items from your deployment package. That is one reason for your metadata that you selected to be removed from your deployment package.
For example here is a problem analyzer removing the deployment of a deletion of a
list view. This would reduce the change that is made to the target org and affect the count on the rollback comparison.
There are many destructive changes that the metadata API cannot apply to the target org. Even if you select those items to deploy and the item shows up in the deployment summary, the metadata API does not change the target org. Subsequently, since that change in metadata has not occurred in the target org, then there is nothing for Gearset to rollback.
For example if the deployment has selected the metadata item to remove the
<controllingFieldValue> from the target, this will have no effect on the target after deployment, as the metadata API does not support it.
If you deploy a New custom field permission, you may expect the rollback comparison to include the selection of the Deleted custom field permission, however, this is not the case.
Due to the way that rollbacks work in Gearset, we have decided to be overcautious and not select automatically the permissions that are classified as a deletion in a rollback comparison to avoid the removing the incorrect permission from your target org.
Do you have other items missing in the rollback comparison that you would like explanations to? If you do, please get in touch with the details and we can look into it with you.