• HOME
  • INTEGRATIONS
  • SDKS
  • GUIDES
  • API DOCS
No results for ""
EXPAND ALL
CLOSE
launchdarkly.com

EDIT ON GITHUB

Compare and copy flag settings

Read time: 1 minute
Last edited: Sep 17, 2020

Overview

This topic explains how to use the Compare button on the dashboard to view flag configurations across different environments.

Comparing flags across environments

You can compare flag configurations between two environments with the Compare flags button. Find it on the dashboard.

The dashboard with the Compare button called out.
The dashboard with the Compare button called out.

To compare a flag, it must have at least two variations, one in each of the environments you wish to compare.

To compare a flag:

  1. Navigate to the dashboard and click Compare. The Compare Flags screen appears.
  2. Choose two environments from the dropdown. Flags appear below the dropdown indicating the differences between the two variations.

The Compare Flags screen with two environments selected.
The Compare Flags screen with two environments selected.

  1. Click a flag's row to see more details about the two variations. This view is similar to a code diff. Current flag configuration appears on the left, and on the right, the proposed flag configuration. The proposed flag configuration is the flag variation from the source environment.
  2. Select checkboxes to choose which settings you would like to copy over from the source environment.

The comparison screen with checkboxes called out.
The comparison screen with checkboxes called out.

  1. Click Copy Settings to save the changes.
Restrictions on custom targeting rules

You can copy all custom targeting rules simultaneously with the Select all checkbox. However, if one of your rules references a segment that does not exist in the target environment, you cannot copy any targeting rules. You will still be able to copy Targeting state, Prerequisites, Individual user targets, Default rule, and fallback rule ("If targeting is off, serve").

The error message indicating that you cannot copy targeting rules.
The error message indicating that you cannot copy targeting rules.