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:
authorMehmet Beydogan <mehmet.beydogan@gmail.com>2016-03-18 20:17:01 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-04-20 22:42:09 +0300
commit61a306aa58f7fffd652a31b85719b19d08f0fd7f (patch)
treed937ae097121109cc05070bde406ae7dc18416aa /app/models/issue.rb
parent83bda94ffcfe1944ea255fdbb8dfd9dac5b97d9f (diff)
Fix functionality of due this week. Add due this month and overdue, remove due tomorrow to issues.
Fix typos on sorting dropdown related to due date Remove constant array and add Structs on Issue to keep due date data to fill options
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index ee5be904330..b9350e191b7 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -28,8 +28,12 @@ class Issue < ActiveRecord::Base
include Sortable
include Taskable
- NO_DUE_DATE = ['No Due Date', '0']
- ANY_DUE_DATE = ['Any Due Date', '']
+ DueDateStruct = Struct.new(:title, :name)
+ NoDueDate = DueDateStruct.new('No Due Date', '0')
+ AnyDueDate = DueDateStruct.new('Any Due Date', '')
+ OverDue = DueDateStruct.new('Overdue', 'overdue')
+ DueThisWeek = DueDateStruct.new('Due This Week', 'week')
+ DueThisMonth = DueDateStruct.new('Due This Month', 'month')
ActsAsTaggableOn.strict_case_match = true