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:

  1. Click the Filter button at the top of the flag list. The bar at the top of the flag list
  2. 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.
  3. In the drop-down list, click "Status". A second drop-down will appear, letting you choose from the four flag statuses.
  4. Click the second drop-down list, then pick "Launched".
  5. 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:

  1. Click the grey Status: Launched filter button under the flag search bar.
  2. 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:

  1. Click the grey Status: Active filter button.
  2. 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.