summaryrefslogtreecommitdiff
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorDrew Blessing <drew.blessing@buckle.com>2013-10-02 08:18:28 -0500
committerDrew Blessing <drew.blessing@buckle.com>2013-10-02 08:18:28 -0500
commit45de7d263d8494d0aaaf99d7a6c44f7f9d2adf09 (patch)
tree1ac1b25aad05b245a24c003e257e2a7485403051 /app/models/issue.rb
parent45efba580173e7e2d8a1a8610ed3e2442723c4ca (diff)
downloadgitlab-ce-45de7d263d8494d0aaaf99d7a6c44f7f9d2adf09.tar.gz
Issue-4769 - Unable to update case of label
Labels are saved in the database with the case they were originally created with. Before this change if a user created a label with the same text but different case the label would use the original case and no new label would be created in the database. With this change, labels are now case-sensitive. Steps to test: 1. Before this change, create a new issue with a new label "FIxMe" 2. Edit the issue and change the label to "FixMe" 3. Note that the label reverted to "FIxMe" 4. Apply this change 5. Edit the issue again and change the label to "FixMe" Note that the new case was preserved. If you also look in the database in the "tags" table you will see that both labels are present - "FIxMe" and "FixMe".
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index f3ec322126f..d350b237d37 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -21,6 +21,8 @@ class Issue < ActiveRecord::Base
include Issuable
include InternalId
+ ActsAsTaggableOn.strict_case_match = true
+
belongs_to :project
validates :project, presence: true