Filtering the flag list
Flag statuses show which flags are the best candidates for cleanup. However, if your project has tens or even hundreds of flags, picking out all such candidates can be laborious. That's why the LaunchDarkly feature flag list has filters. These let you narrow the list of flags being shown to only those flags which meet the filter criteria.
To filter the flag list:
- Click the Filter button at the top of the flag list.
- Click the "Add filter" drop-down. You can filter by several different flag properties, such as tags, the flag maintainer (that is, the team member who created the flag), the flag type, and the current status.
- In the drop-down list, click "Status". A second drop-down will appear, letting you choose from the four flag statuses.
- Click the second drop-down list, then pick "Launched".
- Click the blue Add button.
The flag list now has a filter applied, and only shows flags with the Launched status. If you started this tutorial with an empty project, then you probably don't have any flags in that status, and so the flag list will be empty.
You can change the filter to focus on a different status:
- Click the grey Status: Launched filter button under the flag search bar.
- In the drop-down list, click "Active".
Now you should see the flags which you've created while doing this tutorial.
Let's get rid of the filter:
- Click the grey Status: Active filter button.
- Click the red "CLEAR FILTER" option at the top of the drop-down list.
If a flag has the Launched or Inactive status, that means it's probably a candidate for cleanup. However, before the flag can be removed, all references to the flag should be removed from the code.
In the next step, we'll look at an easy way to find those references.