Skip to content

Label appears locked before it the MR is merged

What does this MR do and why?

When the enforce_locked_labels_on_merge feature flag is enabled, open MRs did not show the label close button for locked labels. This should only happen in merged MRs.

How to set up and validate locally

  1. Enable the feature flag: Feature.enable(:enforce_locked_labels_on_merge)
  2. Enable the feature flag: Feature.enable(:visible_label_selection_on_metadata). This is for labels to appear when you edit an MR.
  3. Visit a group or project label list and create two or three labels, such as workflow::ready, workflow::dev, and workflow::production.
  4. Edit each label and click the checkbox to lock it.
  5. Choose a merged MR, and add one of the locked labels and a regular label. The close button should not be visible for the locked label.
  6. Edit the merged MR, under the labels section you should see the label without the close button.
  7. Choose an open MR, and add one of the locked labels and a regular label. The close button should be visible for the locked label.
  8. Edit the open MR, under the labels section you should see the label with the close button.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #434861 (closed)

Edited by Brett Walker

Merge request reports

Loading