From 54c44fbb7e66185876120566303133e2696a6875 Mon Sep 17 00:00:00 2001 From: john simmons Date: Wed, 7 Sep 2016 16:03:03 -0500 Subject: [PATCH 1/2] formatted the email sent to users to show due date --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4a421b1..7a479ae 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -87,7 +87,7 @@ module ApplicationHelper s = link_to(text, issue_url(issue, :only_path => only_path), :class => issue.css_classes, :title => title) s << h(": #{subject}") if subject - s = h("#{issue.project} - ") + s if options[:project] + s = h("Due date #{issue.due_date} : #{issue.project} - ") + s if options[:project] s end -- 1.9.1 From c109ce342d5ee2776ed9f476d5abc6ed72140759 Mon Sep 17 00:00:00 2001 From: john simmons Date: Wed, 7 Sep 2016 16:16:45 -0500 Subject: [PATCH 2/2] added a sort_by to due_date for email reminders --- app/models/mailer.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index fe02792..af7ed7a 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -406,6 +406,10 @@ class Mailer < ActionMailer::Base end issues_by_assignee.each do |assignee, issues| + #for each value in the hash, sort by due_date + issues = issues.sort_by do |item| + item[:due_date] + end reminder(assignee, issues, days).deliver if assignee.is_a?(User) && assignee.active? end end -- 1.9.1