Do you sometimes feel that Gearset is not respecting the definition in your package.xml?

Is the package.xml  below not returning the comparison results you expect?

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <types>
    <members>Account.Phone</members>
    <name>CustomField</name>
  </types>
  <version>45.0</version>
</Package>

This article explains how Gearset reads your package.xml for comparisons and CI jobs.

How does Gearset read the package.xml?

Gearset will only read and understand the top level metadata types referenced in the package.xml. These are specified by the Salesforce Metadata API, and are the items you see in the custom metadata filter.

Therefore Gearset will recognise Custom object and it's named members, but will not recognise sub-compoments like Custom field , Record Type  or List view in your package.xml. This can be the reason that even though you have a metatdata type (e.g. Custom Field) specifiied in your package.xml , but you aren't seeing the result in the Gearset comparison result. The solution is to specify the top level metadata type instead (e.g. Custom object).

Note for SFDX format git repositories

If the repository is in SDFX format, Gearset does not use the package.xml file to filter the comparison results.

Custom metadata filter versus package.xml

The custom metadata filter determines what is requested and downloaded from your org to present in the results. The package.xml filter takes the metadata info returned from the org and further filters the rows, to only show you the items (and associated sub-components) specified in your package.xml  

Therefore if the filter comparison by package.xml  is ticked, your results will only show items included both in  

  • your custom metadata filter, and 
  • have the top level metadata type referenced in the package.xml 

If there are further questions about this topic not covered by this article, please don't hesitate to ask us in the in-app chat!  


Did this answer your question?