Managing flags with Jira

2 minute read

Flag cleanup helps you determine when it is safe to delete your unused and outdated flags for features that have been fully deployed, by recommending cleanup tasks and quick access links to task locations. Hidden flags can also be deleted. Removing unused feature flags helps you to maintain cleaner code and reduce technical debt.

You can optionally integrate with Jira and configure additional cleanup tasks. Refer to Integrating with Jira for more information.

Before a flag is deleted, CloudBees recommends that you complete all flag cleanup tasks. To learn more, refer to Deleting feature flags.

Adding a Jira issue to a flag

To ensure that you have removed all flag references from the code, or to coordinate other flag tasks, you can optionally add Jira issues to a flag.

You must first integrate CloudBees Feature Management with Jira, and each issue must first exist in Jira before it can be added to a flag. For more information, refer to Integrating with Jira.

To add an issue from Jira to a flag:

  1. From the CloudBees Feature Management Home page, select Flags in environments, and then select an environment.

  2. Select a flag, and then select the Jira tab.

    The number of Jira issues connected to a flag are listed on the Jira tab.
  3. Select Add Jira issue.

    Adding a Jira issue
    Figure 1. The Jira issue tab and Add Jira issue highlighted
  4. Optionally, create a new Jira issue by selecting Create issue. The Jira website opens in a new browser tab.

    Create a Jira issue
    Figure 2. Create issue highlighted
  5. Search for your Jira issue (newly created or existing) using the exact issue key, or the summary subtext.

  6. Select any number of issues from the search results list.

  7. Select Add selected.

    Search results for a Jira issue
    Figure 3. Search results for an example Jira issue, with checkbox and Add selected highlighted

Your Jira issue is added to a flag.

Completing a Jira issue

When the Jira issue is closed or marked as complete from within the Jira UI, it is marked as complete in CloudBees Feature Management with a strikethrough in the issue number and issue name.

A completed Jira issue
Figure 4. An example Jira issue displayed as completed

Removing a Jira issue from a flag

You can remove Jira issues from any flag, regardless of completion status.

To remove a Jira issue:

  1. From the CloudBees Feature Management Home page, select Flags in environments, and then select an environment.

  2. Select a flag, and then select the Jira tab.

  3. Select the trash can icon next to the issue you want to remove.

    The cleanup icon displayed
    Figure 5. The trash can icon highlighted

The Jira issue is removed from the flag.