https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292019-04-19T06:57:43ZRedmineRedmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=912562019-04-19T06:57:43ZGo MAEDA
<ul></ul><p>I noticed a few weeks ago that reminders from Planio already has the information. It is really useful.</p> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=914162019-04-29T02:44:00ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-3 status-5 priority-4 priority-default closed" href="/issues/6357">Patch #6357</a>: Show and sort by due_date in reminders</i> added</li></ul> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=914182019-04-29T02:44:23ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/23778">Feature #23778</a>: default sort email reminders by due date (and list due date in email)</i> added</li></ul> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=918202019-05-17T02:30:39ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/23104">31225_show_days_until_due_date.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23104/31225_show_days_until_due_date.patch">31225_show_days_until_due_date.patch</a> added</li></ul><p>+1<br />I think it is useful because I can understand the number of days until the due date.<br />I attached a patch.</p> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=918242019-05-17T16:32:47ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=918272019-05-17T22:29:07ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>4.1.0</i></li></ul><p>I applied this patch to my production environment and found that the information "Due in X days" / "X days late" is useful. It made me realize that there were too many overdue issues!</p>
<p>I am setting the target version to 4.1.0.</p> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=918412019-05-19T08:53:10ZGo MAEDA
<ul><li><strong>Subject</strong> changed from <i>Show how many days are left until the due date in reminders</i> to <i>Show the number of days left until the due date in reminders</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed the patch. Thanks.</p> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=918692019-05-19T23:36:09ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>The tests fail depending on the timezone.</p>
<p>I think the error occurs when the date of the current timezone is different from the date in UTC. For example, I observed the following error on <strong>20 May</strong> 2019 08:15:00 +0900 (<strong>19 May</strong> 2019 23:15:00 UTC)</p>
<pre>
F
Failure:
MailerTest#test_reminders_should_sort_issues_by_due_date [/Users/maeda/redmines/trunk/test/unit/mailer_test.rb:749]:
<(?-mix:foo \(1 day late\))> expected but was
<eCookbook - Bug #219: foo (2 days late)>..
Expected 0 to be >= 1.
bin/rails test test/unit/mailer_test.rb:738
</pre> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=918782019-05-20T05:23:11ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/23116">31225_fix_test.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23116/31225_fix_test.patch">31225_fix_test.patch</a> added</li></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>The tests fail depending on the timezone.</p>
<p>I think the error occurs when the date of the current timezone is different from the date in UTC. For example, I observed the following error on <strong>20 May</strong> 2019 08:15:00 +0900 (<strong>19 May</strong> 2019 23:15:00 UTC)</p>
<p>[...]</p>
</blockquote>
<p>Sorry, I fixed to the UTC Date at 0:00 using <code>travel_to Date.today.to_time(:utc)</code> .<br />This fix eliminates the dependency on time zones.</p> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=919132019-05-20T15:26:40ZGo MAEDA
<ul></ul><p>Yuichi HARADA wrote:</p>
<blockquote>
<p>Sorry, I fixed to the UTC Date at 0:00 using <code>travel_to Date.today.to_time(:utc)</code> .<br />This fix eliminates the dependency on time zones.</p>
</blockquote>
<p>Unfortunately, tests still fail.</p>
<pre>
$ date
Tue May 21 00:22:38 JST 2019
$ bin/rails test test/unit/mailer_test.rb:622
Run options: --seed 55322
# Running:
F
Failure:
MailerTest#test_reminders [/Users/maeda/redmines/trunk/test/unit/mailer_test.rb:628]:
"Bug #3: Error 281 when updating a recipe (5 days late)" not found in "1 issue(s) that are assigned to you are due in the next 42 days::
* eCookbook - Bug #3: Error 281 when updating a recipe (6 days late)
View all issues (2 open)
http://localhost:3000/issues?assigned_to_id=me&set_filter=1&sort=due_date%3Aasc
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://hostname/my/account
"
bin/rails test test/unit/mailer_test.rb:622
Finished in 1.727797s, 0.5788 runs/s, 2.3151 assertions/s.
1 runs, 4 assertions, 1 failures, 0 errors, 0 skips
</pre> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=919512019-05-22T00:50:13ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/23132">31225_fix_test_v2.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23132/31225_fix_test_v2.patch">31225_fix_test_v2.patch</a> added</li></ul><p>When replacing Time with Date, <code>due_date</code> was incorrect because timezone and time were truncated.<br />I rebuilt a test.</p> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=919552019-05-22T05:31:53ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/23138">24941_set_time_zone_to_utc.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/23138/24941_set_time_zone_to_utc.patch">24941_set_time_zone_to_utc.patch</a> added</li></ul><p>Yuichi HARADA wrote:</p>
<blockquote>
<p>When replacing Time with Date, <code>due_date</code> was incorrect because timezone and time were truncated.<br />I rebuilt a test.</p>
</blockquote>
<p>Thank you for updating the test. I wrote a simpler patch.</p>
<p>The root cause of the test failure is that a time zone is not set for users in test fixtures. Because of that, the time zone of users while running test depends on the timezone of the PC, and the result of test will be unstable.</p>
<p>This patch fixes the problem by fixing the user's time zone to UTC while running mailer_test.</p> Redmine - Feature #31225: Show the number of days left until the due date in remindershttps://www.redmine.org/issues/31225?journal_id=919752019-05-22T15:23:02ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>The tests fail depending on the timezone.</p>
<p>I think the error occurs when the date of the current timezone is different from the date in UTC. For example, I observed the following error on <strong>20 May</strong> 2019 08:15:00 +0900 (<strong>19 May</strong> 2019 23:15:00 UTC)</p>
<p>[...]</p>
</blockquote>
<p>Committed the fix <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Show the number of days left until the due date in reminders (Closed)" href="https://www.redmine.org/issues/31225#note-12">#31225#note-12</a> in <a class="changeset" title="MailerTest fails depending on the time (#31225). Patch by Go MAEDA." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/18190">r18190</a>.</p>