Skip to content

Fix processing locked scoped labels

Brett Walker requested to merge 408676-fix-processing-locked-labels into master

What does this MR do and why?

It was possible to try and add another scoped label through the dropdown, and if the current label was locked, it would still remove it, which is incorrect. It should not remove a locked label.

How to set up and validate locally

  1. Enable the feature flag: Feature.enable(:enforce_locked_labels_on_merge)
  2. Visit a group or project label list and create two or three scoped labels, such as workflow::ready, workflow::dev, and workflow::production.
  3. Edit each scoped label and click the checkbox to lock it.
  4. Choose an issue (or un-merged MR), and add a scoped label to it. You should be able to remove the label, change from one to the other, etc. Normal behavior
  5. Choose a merged MR, and add scoped label. You should not be able to delete it or change it to another scoped label. You should be able to freely add/delete any non-locked label.
  6. In the same MR, use the label dropdown to change the scoped label. This should now properly work and not remove the scoped label.

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 #408676

Edited by Brett Walker

Merge request reports

Loading