From 30ba7aea19203998eda68203ce0cdac38fa6b48b Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 20 Aug 2014 09:54:47 +0200 Subject: [PATCH] Document characters being stripped from labels --- db/migrate/20140729152420_migrate_taggable_labels.rb | 4 +++- doc/update/6.0-to-7.2.md | 7 +++++++ doc/update/7.1-to-7.2.md | 7 +++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/db/migrate/20140729152420_migrate_taggable_labels.rb b/db/migrate/20140729152420_migrate_taggable_labels.rb index f747fd71536..f164015506d 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 41ff6283603..e7c922d9158 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 be28944a8fe..0e5575467d8 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