Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-10-06 19:57:13 +0300
committerStan Hu <stanhu@gmail.com>2015-10-07 17:21:50 +0300
commitdfbbc80611fbdafe6f5ed809f98fc63987d104a6 (patch)
tree00a5f131e4b54c14162fc2a89cc2cca1a73512c9 /app/models
parentcc8c91a1183ebfc5bb252f5e7f3f09fc20546476 (diff)
Support filtering by "Any" milestone or issue and fix "No Milestone" and "No Label" filters
Closes #2619 Closes https://github.com/gitlabhq/gitlabhq/issues/9631
Diffstat (limited to 'app/models')
-rw-r--r--app/models/label.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index 4a22bd53400..14b544b3756 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -12,6 +12,9 @@
class Label < ActiveRecord::Base
include Referable
+ # Represents a "No Label" state used for filtering Issues and Merge
+ # Requests that have no label assigned.
+ None = Struct.new(:title, :name).new('No Label', 'No Label')
DEFAULT_COLOR = '#428BCA'