Render group label references properly after switching to label events
follow-up from https://gitlab.com/gitlab-org/gitlab-ce/issues/48483#note_95382785:
Scenario: an issue references a group label in it's note and then this issue is moved to a different group.
With using old system notes for label changes, all group label links are nicely rendered because when moving an issue between projects, we inject old project reference into label system note (even if it's a group label) - so label ~37
is replaced with old_group/old_project~37
.
After switching from system notes to label events, there is a problem with referencing these cross-group labels (from completely different group) because banzai label filter doesn't support cross-project group label references (@old_group~37
). If a cross-project project label is referenced, it's fine, but if a cross-project group labels are not recognized (https://gitlab.com/gitlab-org/gitlab-ce/issues/48483#scenario-4)
We would need to either extend label rendering filter to support group-label links (which seems to be cleaner solution) or we would have to keep an extra information in the resource_label_events
tables for each record.
/cc @victorwu