Feature #33884

Show "Due in X days" in email notifications

Added by Go MAEDA 2 months ago. Updated about 1 month ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email notifications
Target version:-
Resolution:

Description

Issue details page shows "Due in X days" information next to the due date (#31499). I think it is useful and consistent if the infromation is also shown in email notification.

due-in-x-days-in-email-notification.png (86.8 KB) Go MAEDA, 2020-08-22 07:15

fixed-33884.patch Magnifier (1.86 KB) Yuichi HARADA, 2020-09-03 08:30


Related issues

Related to Redmine - Feature #31499: Show "Due in X days" in issue details page Closed

History

#1 Updated by Go MAEDA 2 months ago

  • Related to Feature #31499: Show "Due in X days" in issue details page added

#2 Updated by Yuichi HARADA about 1 month ago

I created a patch with reference to #31499.

diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index a6515d283..caf23bfdd 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -384,6 +384,9 @@ module IssuesHelper
         attr_value = (issue.send attribute).to_s
         next if attr_value.blank?

+        if attribute == 'due_date'
+          attr_value << " (#{due_date_distance_in_words(issue.send(attribute))})" unless issue.closed?
+        end
         if html
           items << content_tag('strong', "#{l("field_#{attribute}")}: ") + attr_value
         else

#3 Updated by Robert Korulczyk about 1 month ago

This may be confusing in some cases. If I read this email 2 days later, "due in 9 days" is misleading, since it should be "due in 7 days" now, but email will contain initial and outdated label. Using relative dates in emails (which are static) is a different story than relative dates on website (which will update on every page refresh).

#4 Updated by Marius BALTEANU about 1 month ago

Robert Korulczyk wrote:

This may be confusing in some cases. If I read this email 2 days later, "due in 9 days" is misleading, since it should be "due in 7 days" now, but email will contain initial and outdated label. Using relative dates in emails (which are static) is a different story than relative dates on website (which will update on every page refresh).

I agree.

Also available in: Atom PDF