diff --git a/db/migrate/20140729152420_migrate_taggable_labels.rb b/db/migrate/20140729152420_migrate_taggable_labels.rb index f747fd715364504dd98bc0d8b7faad2f58f6a6e6..f164015506d672876c7d531e880be5d38f74243d 100644 --- a/db/migrate/20140729152420_migrate_taggable_labels.rb +++ b/db/migrate/20140729152420_migrate_taggable_labels.rb @@ -15,7 +15,9 @@ class MigrateTaggableLabels < ActiveRecord::Migration def create_label_from_tagging(tagging) target = tagging.taggable - label_name = tagging.tag.name.tr('?&,', '') + label_name = tagging.tag.name + # '?', '&' and ',' are no longer allowed in label names so we remove them + label_name.tr!('?&,', '') label = target.project.labels.find_or_create_by(title: label_name, color: Label::DEFAULT_COLOR) if label.valid? && LabelLink.create(label: label, target: target) diff --git a/doc/update/6.0-to-7.2.md b/doc/update/6.0-to-7.2.md index 913768aee07c1435caa179bddd25d86a2cf2ab19..fc0525e1c37ba2ea87e7ab0957488c22e76aabfe 100644 --- a/doc/update/6.0-to-7.2.md +++ b/doc/update/6.0-to-7.2.md @@ -6,6 +6,13 @@ As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. +## Editable labels + +In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it +possible to edit the label text and color. The characters '?', '&' and ',' are +no longer allowed however so those will be removed from your tags during the +database migrations for GitLab 7.2. + ## 0. Backup It's useful to make a backup just in case things go south: diff --git a/doc/update/7.1-to-7.2.md b/doc/update/7.1-to-7.2.md index 40698e80929cb45d47b3f09e424e5c20e1351f08..6359bcfac371c80002d1a1fa81cf8073846e3f31 100644 --- a/doc/update/7.1-to-7.2.md +++ b/doc/update/7.1-to-7.2.md @@ -1,5 +1,12 @@ # From 7.1 to 7.2 +## Editable labels + +In GitLab 7.2 we replace Issue and Merge Request tags with labels, making it +possible to edit the label text and color. The characters '?', '&' and ',' are +no longer allowed however so those will be removed from your tags during the +database migrations for GitLab 7.2. + ### 0. Backup ```bash