Gearset’s custom metadata filters have just got more powerful. You can now fine-tune your filters to specify exactly which items you’d like to compare before you run a comparison. The result? Faster comparisons which show you exactly what you’re interested in deploying, and nothing else.
Custom metadata filters
When running a comparison, by default Gearset compares the most common metadata types between your source and target, including Custom Objects, Profiles, Permissions, and Apex code. If you want more control over what metadata is compared, you can create a custom metadata filter.
Custom filters let you define which types of metadata you want to retrieve, and filter out those you’re not interested in. They also allow you to add in the less commonly compared metadata types which aren't included in the default setting, such as Reports, Static Resources, and Documents. Retrieving less metadata means your comparisons will run faster too.
How custom filters used to work
Custom filters used to take an all or nothing approach - if you selected a metadata type, Gearset would retrieve all items of that type in the comparison.
For example, let’s say I’d been making some changes to a couple of Apex classes in my developer environment. I want to compare these changes to my staging environment and then deploy them out to be tested.
Previously, I would have created a custom filter which only included the
Apex class metadata type and run the comparison.
If I only had a couple of Apex classes in those two orgs, this would work really well. But what if our organisation had 5000 Apex classes? Previously, Gearset had to retrieve all 5000 classes to run the comparison. This could lead to slow comparisons as I waited for Salesforce to pass back all the metadata. When the results loaded, I then had to search for the 2 classes I was interested in amongst the other noise of 4998 items in the results grid.
Although this is an extreme example, for some of our users with large Salesforce implementations this old approach didn’t deliver the performance or simplicity we aim for when using Gearset. So we decided to improve it.
How custom filters work now
With this latest release, you’ve got an extra level of granularity in the metadata filtering. As well as choosing the metadata types to retrieve, such as Apex Classes, you can now specify the names of specific items to retrieve as well. Here's what the filter dialogue looks like now.
Let’s take my previous example and see how creating a custom filter works with the updated functionality. In the custom filters dialogue, I select
Apex class as the metadata type in the first column, just like before.
In the second column, I can now switch the slider from
All items to the
Named items mode.
To add specific classes to the filter, I can enter their names via the
Add box. This works really well for a few items, but it does mean I have to remember the names of the classes to add.
For even speedier selection, if I select my source and target orgs in the Compare & Deploy screen, Gearset will automatically list all of the Apex classes in my orgs for me. I then simply select which classes I want to include in the comparison using the checkboxes. I can even narrow down the results with the search box to quickly find what I'm after.
When I'm done, I'll give this filter a name and save it (if I want to re-use these settings in the future), or just click
OK and kick off my comparison.
Gearset will now retrieve only those 2 Apex classes in the comparison and, when the results pop up, I can simply select them and deploy them out to my staging environment. The result? Faster deployments and more time in my day to focus on delivering customer success!
Custom filters are shared with your team
When you save a custom filter, it's automatically shared with anyone else in your team in Gearset. That means once you’ve created a filter, your colleagues can take advantage of the benefits without having to spend any time making their own.
Available for monitoring and CI jobs too
Custom filters aren’t just for comparisons. They can also be used in the automated change monitoring and continuous integration jobs to fine-tune which metadata to track and deploy.
For power users with a number of CI jobs across multiple environments, these new filters will give you total control over your continuous delivery pipeline with Gearset.