summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-04-20 14:41:50 +0200
committerRobert Speicher <rspeicher@gmail.com>2016-04-20 15:43:32 -0400
commit3a7290f387ad6d568ddc5b102218c719dd42ed5d (patch)
treee1dda6b94476a9d69f024377cbb6ebbf42c548d3 /app/finders
parentda2e31549c256071d2488db1b4641bf1dda19afe (diff)
downloadgitlab-ce-3a7290f387ad6d568ddc5b102218c719dd42ed5d.tar.gz
Move Issue scopes from Issuable to Issue model
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/issuable_finder.rb40
1 files changed, 20 insertions, 20 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 88ddeefa079..a85c214e4c4 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -113,26 +113,6 @@ class IssuableFinder
end
end
- def due_date?
- params[:due_date].present? && klass.column_names.include?('due_date')
- end
-
- def filter_by_no_due_date?
- due_date? && params[:due_date] == Issue::NoDueDate.name
- end
-
- def filter_by_overdue?
- due_date? && params[:due_date] == Issue::Overdue.name
- end
-
- def filter_by_due_this_week?
- due_date? && params[:due_date] == Issue::DueThisWeek.name
- end
-
- def filter_by_due_this_month?
- due_date? && params[:due_date] == Issue::DueThisMonth.name
- end
-
def labels?
params[:label_name].present?
end
@@ -320,6 +300,26 @@ class IssuableFinder
items
end
+ def filter_by_no_due_date?
+ due_date? && params[:due_date] == Issue::NoDueDate.name
+ end
+
+ def filter_by_overdue?
+ due_date? && params[:due_date] == Issue::Overdue.name
+ end
+
+ def filter_by_due_this_week?
+ due_date? && params[:due_date] == Issue::DueThisWeek.name
+ end
+
+ def filter_by_due_this_month?
+ due_date? && params[:due_date] == Issue::DueThisMonth.name
+ end
+
+ def due_date?
+ params[:due_date].present? && klass.column_names.include?('due_date')
+ end
+
def label_names
params[:label_name].split(',')
end