Issue "added label" notes not imported correctly from GitLab export

Summary

When importing a GitLab export, the issue notes that "user added label foo" are not fixed up properly. Instead of displaying the correct label, it will display the ~number format of the exported label's ID.

Steps to reproduce

  1. Create a repo.
  2. Create a label in said repo.
  3. On the labels page, hover over the "Edit" link and make note of the label's ID (e.g. 3371784 in https://gitlab.com/tecknicaltom/test1/labels/3371784/edit)
  4. Create an issue in said repo.
  5. Add the label to the repo.
  6. Export the repo.
  7. Create a new repo by importing the exported repo.
  8. Navigate to the issue in the new repo.
  9. Observe that the issue's note says e.g.: Tom Samstag @tecknicaltom added ~3371784 label By Tom Samstag on 2018-01-24T02:19:38 (imported from GitLab project) 3 minutes ago referencing the ID of the label in the original repo (3371784) instead of the label name

Example Project

https://gitlab.com/tecknicaltom/test2/issues/1

What is the current bug behavior?

The issue note references the original repo's label ID instead of the label name

What is the expected correct behavior?

The issue note should reference the new repo's label by name/badge

Relevant logs and/or screenshots

see https://gitlab.com/tecknicaltom/test2/issues/1

Output of checks

This bug happens on GitLab.com

Assignee Loading
Time tracking Loading