Feature #33884
openShow "Due in X days" in email notifications
0%
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.
Files
Related issues
Updated by Go MAEDA over 4 years ago
- Related to Feature #31499: Show "Due in X days" in issue details page added
Updated by Yuichi HARADA over 4 years ago
- File fixed-33884.patch fixed-33884.patch added
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
Updated by Robert Korulczyk over 4 years 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).
Updated by Marius BÄ‚LTEANU over 4 years 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.