• Home
  • Integrations
  • SDKs
  • Guides
  • API docs
    No results for ""
    EXPAND ALL

    EDIT ON GITHUB

    Approvals

    Read time: 5 minutes
    Last edited: Jan 17, 2023
    Approvals is a Pro and Enterprise feature

    Approvals is available to customers on a Pro or Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

    Requiring approvals by environment is available only to customers on an Enterprise plan. To learn more, read Configuring approvals by environment.

    Overview

    This topic explains how to use LaunchDarkly's approvals feature to request review for changes you plan to make to a flag. It also explains how to review an approval request when you are asked to.

    You can customize an environment's approval settings in the Environments tab of a project under the Account settings page. To learn more, read Configuring approvals by environment.

    Understanding approvals

    When an account member plans a flag change, they have the option to request approval for that change from a member or team in their LaunchDarkly project. Approvals let more people have input on planned changes to a flag. These review-style approvals mimic common code review workflows, such as pull request (PR) reviews in GitHub.

    Anyone with a Writer, Admin, Owner, or custom role with reviewApprovalRequest permission can approve a flag change, regardless of whether or not their review has been requested. Account members and team members who the requester chooses receive an email notifying them that their review has been requested, and, if applicable, a notification in the LaunchDarkly Slack app.

    Requesting approvals

    You can request approval on changes to a flag's targeting from any member or team within your LaunchDarkly organization. You can do this any time after you create a flag. Members that do not have permission to approve requests can still view the change.

    Here's how:

    1. Make a change to any flag.

    2. Click the dropdown icon in the Review and save button. The additional actions menu appears:

      The "Review and save" button with the additional actions menu expanded.
      The "Review and save" button with the additional actions menu expanded.
    Your environment may require approvals

    If your environment requires approvals, Review and request approval is the default option. To learn more, read Configuring approvals by environment.

    1. Click "Request approval." The "Request approval" dialog appears.
    The "Request approval" dialog.
    The "Request approval" dialog.
    1. Review and confirm the changes displayed in the dialog. If you need to make changes, click Edit next to the pencil icon.
    2. Enter a Description to add context that helps your reviewers understand the changes you made.
    3. Choose one or more reviewers from the Reviewers menu.
    4. Click Request approval. The approval request appears.

    Reviewers receive an email, an in-app inbox notification, and, if they use the LaunchDarkly Slack app, a Slack notification asking them to approve your flag changes.

    The flag's Targeting tab also updates with a number next to the Pending changes icon to indicate that there are pending changes waiting for review:

    The "Pending changes" icon on the flag's "Targeting" tab.
    The "Pending changes" icon on the flag's "Targeting" tab.

    You can also use the REST API: Create approval request

    Requesting approval for copying flags

    When you copy flag settings between environments, if the environment you're copying changes to requires approval, then Review and request approval is the default option. To learn more, read Comparing and copying flag settings between two environments and Configuring approvals by environment.

    Viewing flag approval requests

    If someone requests your approval on a flag change, the request appears in the Approval dashboard and in the pending changes drawer on a flag's Targeting tab.

    You will receive an email, an in-app inbox notification, and, if you use the LaunchDarkly Slack app, a Slack notification. You can click through to view and approve or decline the request from any of these notifications.

    Viewing approval notifications from the Approval dashboard

    To view approval notifications from the Approval dashboard:

    1. Click the approval icon in the top menu bar. The Approval request dashboard opens.
    The top menu bar, with the "Approval" icon called out.
    The top menu bar, with the "Approval" icon called out.
    1. Click the request's Reason or click the overflow menu and select "View details." The Review request screen opens.
    The Approval dashboard view.
    The Approval dashboard view.

    By default, the Approval dashboard is filtered to show approval requests on which you have been requested as a reviewer, and are pending review. To see other approval requests, you can edit the filters to change the views on this screen.

    You can also use the REST API: Review approval request

    Viewing approval notifications from the flag

    To view approval notifications from a flag's Targeting tab:

    1. Navigate to the flag where changes were requested.
    2. Click the Pending changes icon on the flag's Targeting tab. The Pending changes panel opens.
    The "Pending changes" icon on the flag's "Targeting" tab.
    The "Pending changes" icon on the flag's "Targeting" tab.
    1. Click View to open the approval request details screen.

    Viewing approval notifications from email

    To view approval notifications from your email:

    1. Find the email from "The Team at LaunchDarkly" in your email client. The email subject includes the name of the project, environment, and flag you're being asked to review and the phrase "Review request."
    2. In the message body, click Review request to open the approval request details screen in LaunchDarkly.

    Viewing approval notifications from your in-app inbox

    To view approval notifications from your in-app inbox:

    1. Click the bell icon in the top menu bar. The approval notification inbox appears.
    The approval notification inbox with a new approval request.
    The approval notification inbox with a new approval request.
    1. Click View Details. The approval request details screen opens.

    Viewing approval notifications from Slack

    To view approval notifications from Slack:

    1. Click on the new notification from the LaunchDarkly Slack app.
    2. Click on Review request to open the approval request details screen in LaunchDarkly.

    To learn more about the Slack app, read Slack.

    Approving and declining changes

    You can comment on, approve, and decline flag changes from the approval request details screen.

    Here are the actions you can take during your review:

    • Approve and apply changes: Approve the changes and apply them immediately. The "Review history" section updates to indicate that you reviewed the change request, and the requestor receives an email notification. If scheduled for a future date, the change will apply at the scheduled date and time.
    • Approve changes: Approve the changes without applying them. The original requester, or any account member with a Writer, Admin, Owner, or appropriate custom role can apply the changes you approved.
    • Decline changes: Deny the changes.
    • Comment only: Leave a comment on the requested flag changes.
    The approval request details screen.
    The approval request details screen.
    Anyone with role access can leave a comment

    Anyone with role access can comment on an approval request. This includes the requestor, as well as anyone with a role of Writer, Admin, Owner, or anyone with a custom role that can review approval requests.

    The only time someone with access cannot comment on an approval request is after the request has been applied. Applying an approval request freezes the approval request page to preserve the state it was in when the change was applied.

    Only member accounts can approve and apply changes to an approval request. Approvals do not support service tokens.

    You can also use the REST API: Apply approval request, Review approval request

    Deleting an approval request

    You may delete your request for changes to a flag at any point before the changes are applied. You can do this in two ways:

    • from the "Pending changes" panel, or
    • from the approval request.

    You can also use the REST API: Delete approval request

    Deleting an approval request from the Approval dashboard

    To delete approval requests from the Approval dashboard:

    1. Navigate to the Approval dashboard. Find the request you wish to delete and click the overflow menu.
    The "Delete request" option in the the overflow menu.
    The "Delete request" option in the the overflow menu.
    1. Choose "Delete request." A confirmation dialog appears.
    2. Type the flag's key to confirm.
    3. Click Delete. The request is deleted.

    Deleting an approval request from the "Pending changes" panel

    To delete approval requests from a flag's "Pending changes" panel:

    1. Navigate to the flag's Targeting tab and click the Pending changes icon. The "Pending changes" panel appears.
    2. Find the change you wish to delete and click the overflow menu. Additional options appear:
    The "Delete" option in the the overflow menu.
    The "Delete" option in the the overflow menu.
    1. Choose "Delete." A confirmation dialog appears.
    2. Type the flag's key to confirm.
    3. Click Delete. The request is deleted.

    Deleting an approval request from its page

    To delete an approval request from the request's page:

    1. Navigate to the flag's Targeting tab and click the Pending changes icon. The "Pending changes" panel appears.
    2. Click View. The approval request appears.
    3. Click the overflow menu and choose "Delete request." A confirmation dialog appears.
    4. Enter the flag's name or key to confirm.
    5. Click Delete request. The request is deleted:
    The overflow menu expanded with the "Delete request" option.
    The overflow menu expanded with the "Delete request" option.