Vote #81019
未完了Show "Due in X days" in email notifications
0%
説明
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.
!{width: 511px; border: 1px solid #ccc;}.due-in-x-days-in-email-notification.png!
journals
--------------------------------------------------------------------------------
I created a patch with reference to #31499.
<pre><code class="diff">
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
</code></pre>
--------------------------------------------------------------------------------
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).
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
related_issues
relates,Closed,31499,Show "Due in X days" in issue details page