Project

General

Profile

Actions

Patch #6357

closed

Show and sort by due_date in reminders

Added by Erwin Schliske almost 14 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email notifications
Target version:
-
Start date:
2010-09-10
Due date:
% Done:

0%

Estimated time:

Description

Hello,

here a small patch which I use to show and sort by due_date in the reminders sent with cron.

Regards,

Erwin Schliske

diff -rupN app.orig/views/mailer/reminder.text.html.rhtml app/views/mailer/reminder.text.html.rhtml
--- app.orig/views/mailer/reminder.text.html.rhtml      2010-09-10 14:09:40.000000000 +0200
+++ app/views/mailer/reminder.text.html.rhtml   2010-09-10 14:55:12.000000000 +0200
@@ -1,8 +1,9 @@
 <p><%= l(:mail_body_reminder, :count => @issues.size, :days => @days) %></p>

 <ul>
+<% @issues.sort! { |a,b| a.due_date <=> b.due_date } -%>
 <% @issues.each do |issue| -%>
-  <li><%=h issue.project %> - <%=link_to("#{issue.tracker} ##{issue.id}", :controller => 'issues', :action => 'show', :id => issue, :only_path => false)%>: <%=h issue.subject %></li>
+<li><%=h issue.due_date %> - <%=h issue.project %> - <%=link_to("#{issue.tracker} ##{issue.id}", :controller => 'issues', :action => 'show', :id => issue, :only_path => false)%>: <%=h issue.subject %></li>
 <% end -%>
 </ul>

diff -rupN app.orig/views/mailer/reminder.text.plain.rhtml app/views/mailer/reminder.text.plain.rhtml
--- app.orig/views/mailer/reminder.text.plain.rhtml     2010-09-10 14:02:18.000000000 +0200
+++ app/views/mailer/reminder.text.plain.rhtml  2010-09-10 14:55:24.000000000 +0200
@@ -1,7 +1,8 @@
 <%= l(:mail_body_reminder, :count => @issues.size, :days => @days) %>:

+<% @issues.sort! { |a,b| a.due_date <=> b.due_date } -%>
 <% @issues.each do |issue| -%>
-* <%= "#{issue.project} - #{issue.tracker} ##{issue.id}: #{issue.subject}" %>
+* <%= "#{issue.due_date} - #{issue.project} - #{issue.tracker} ##{issue.id}: #{issue.subject}" %>
 <% end -%>

 <%= @issues_url %>


Related issues

Related to Redmine - Feature #23778: default sort email reminders by due date (and list due date in email)Closed

Actions
Related to Redmine - Feature #29771: Sort issues by due date in email remindersClosedGo MAEDA

Actions
Related to Redmine - Feature #31225: Show the number of days left until the due date in remindersClosedGo MAEDA

Actions
Actions #1

Updated by Go MAEDA over 5 years ago

  • Related to Feature #23778: default sort email reminders by due date (and list due date in email) added
Actions #2

Updated by Go MAEDA over 5 years ago

  • Related to Feature #29771: Sort issues by due date in email reminders added
Actions #3

Updated by Go MAEDA over 5 years ago

  • Description updated (diff)
Actions #4

Updated by Go MAEDA over 5 years ago

Issues in reminders are now sorted by due date (#29771).

Actions #5

Updated by Erwin Schliske over 5 years ago

  • Status changed from New to Resolved

Go MAEDA wrote:

Issues in reminders are now sorted by due date (#29771).

Great. Then this ticket can be closed.

Actions #6

Updated by Go MAEDA about 5 years ago

  • Related to Feature #31225: Show the number of days left until the due date in reminders added
Actions #7

Updated by Go MAEDA about 5 years ago

  • Status changed from Resolved to Closed

The upcoming Redmine 4.1.0 shows the number of days left until the due date ("due in X days" / "X days late"). Please see #31225 for details.

Actions

Also available in: Atom PDF