summaryrefslogtreecommitdiffstats
path: root/app/helpers/issues_helper.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-06-07 09:40:12 +0000
committerGo MAEDA <maeda@farend.jp>2019-06-07 09:40:12 +0000
commita12a6f6c3ec9634ee5f2a00a0db10b9966aaa8fc (patch)
treed0b38889e8ad8bac3610598c0655c1ac7bbf12e7 /app/helpers/issues_helper.rb
parent048601bdf354b747013ed291ced972c5359a85dc (diff)
downloadredmine-a12a6f6c3ec9634ee5f2a00a0db10b9966aaa8fc.tar.gz
redmine-a12a6f6c3ec9634ee5f2a00a0db10b9966aaa8fc.zip
Show "Due in X days" in issue details page (#31499).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@18236 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r--app/helpers/issues_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 0df257d37..cfdb15ad1 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -176,6 +176,13 @@ module IssuesHelper
end
end
+ def issue_due_date_details(issue)
+ return if issue&.due_date.nil?
+ s = format_date(issue.due_date)
+ s += " (#{due_date_distance_in_words(issue.due_date)})" unless issue.closed?
+ s
+ end
+
# Returns a link for adding a new subtask to the given issue
def link_to_new_subtask(issue)
attrs = {