diff options
author | Mehmet Beydogan <mehmet.beydogan@gmail.com> | 2016-03-10 16:26:56 +0200 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-04-20 15:42:09 -0400 |
commit | 3afd08170da6f003b4f11ae1a3f737b14dedec40 (patch) | |
tree | 0e858cd1c275f7862743022e4c2b24bfef3b2148 /app/helpers/issues_helper.rb | |
parent | 1e596fef1c42a1dd925636c48fea01be444dc3ab (diff) | |
download | gitlab-ce-3afd08170da6f003b4f11ae1a3f737b14dedec40.tar.gz |
Add due_date:time field to Issue model
Add due_date text field to sidebar issue#show
Add ability sorting issues by due date ASC and DESC
Add ability to filtering issues by No Due Date, Any Due Date, Due to tomorrow, Due in this week options
Add handling issue due_date field for MergeRequest
Update CHANGELOG
Fix ambigous match for issues#show sidebar
Fix SCREAMING_SNAKE_CASE offenses for due date contants
Add specs for due date sorting and filtering on issues
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r-- | app/helpers/issues_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 4cb8adcebad..2a193e12ec9 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -172,6 +172,17 @@ module IssuesHelper end.to_h end + def due_date_options + options = [ + ["Due to tomorrow", 1.day.from_now.to_date], + ["Due in this week", 1.week.from_now.to_date] + ] + options.unshift(Issue::ANY_DUE_DATE) + options.unshift(Issue::NO_DUE_DATE) + options_for_select(options, params[:due_date]) + end + + # Required for Banzai::Filter::IssueReferenceFilter module_function :url_for_issue end |