Preserving issue label history when labels are renamed or removed

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

On issues where a system note references a label which no longer exists, we see currently something like the following (from gitlab-ce#22921):

Screen_Shot_2017-05-26_at_3.21.43_PM

We have no way of knowing what ~19492 used to point to, and it just looks arcane and ugly to someone who doesn't understand the ~labelname syntax.

I propose that instead of using label IDs when creating system notes, we use the ~"label name" syntax instead. This way we can continue to render them as labels, and we can even remember their name, e.g.:

revised-label-note

Since we don't have a label to reference, we won't know its original color or description. That's fine, we can just make it a muted gray color and have the tooltip reveal that the label no longer exists:

tooltip

The only downside to this is that labels which are renamed won't track the same way they do with their ID-based approach now, but I think I'd rather see the label name that was assigned when the system note was created rather than the label as it is named currently. If we want to see the current label name, we'll still see that in the issue metadata on the sidebar.

Edited Jun 17, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading