Skip to content

Add error handling for controllers when deleting labels

Brett Walker requested to merge 408676-label-deletion-controllers into master

What does this MR do and why?

Adds error handling for when deleting a locked label through the Label controllers.

How to set up and validate locally

  1. Find a project, and a label. Hover over the "Edit" link to get the label's id

  2. Update the lock_on_merge column of the labels table for the id, to true. Such as Label.find(109).update!(lock_on_merge: true)

  3. Go list of labels, and try to delete the label.

  4. You should see an alert similar to this, indicating the label could not be deleted

    Screenshot_2023-08-11_at_11.48.21_AM

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