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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-14 18:09:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-14 18:09:40 +0300
commitfde3e0435c496af7dc37527f465573abd5657f5a (patch)
tree378395c009c4e9b40c3c509189531511494539e5 /app/models/concerns/timebox.rb
parent95671fac6e66cd23da4669706a619c1139eb1f14 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/timebox.rb')
-rw-r--r--app/models/concerns/timebox.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/models/concerns/timebox.rb b/app/models/concerns/timebox.rb
index a1f67860e3c..8273059b30c 100644
--- a/app/models/concerns/timebox.rb
+++ b/app/models/concerns/timebox.rb
@@ -12,10 +12,16 @@ module Timebox
include FromUnion
TimeboxStruct = Struct.new(:title, :name, :id) do
+ include GlobalID::Identification
+
# Ensure these models match the interface required for exporting
def serializable_hash(_opts = {})
{ title: title, name: name, id: id }
end
+
+ def self.declarative_policy_class
+ "TimeboxPolicy"
+ end
end
# Represents a "No Timebox" state used for filtering Issues and Merge
@@ -24,8 +30,6 @@ module Timebox
Any = TimeboxStruct.new('Any Timebox', '', -1)
Upcoming = TimeboxStruct.new('Upcoming', '#upcoming', -2)
Started = TimeboxStruct.new('Started', '#started', -3)
- # For Iteration
- Current = TimeboxStruct.new('Current', '#current', -4)
included do
# Defines the same constants above, but inside the including class.
@@ -33,7 +37,6 @@ module Timebox
const_set :Any, TimeboxStruct.new("Any #{self.name}", '', -1)
const_set :Upcoming, TimeboxStruct.new('Upcoming', '#upcoming', -2)
const_set :Started, TimeboxStruct.new('Started', '#started', -3)
- const_set :Current, TimeboxStruct.new('Current', '#current', -4)
alias_method :timebox_id, :id