Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modifications to display date due with the issue and sorting from the…

… most recent to the oldes date due
  • Loading branch information...
commit 3b988defcae12057ff4c8691375e05d3148cdc36 1 parent 5262f1f
@alvila authored
View
6 app/views/reminder_all/reminder_all.text.html.rhtml
@@ -9,7 +9,7 @@ case @assigned_issues.length
<ul>
<% @assigned_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>
<% end
@@ -22,7 +22,7 @@ case @auth_issues.length
<ul>
<% @auth_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>
<% end
@@ -35,7 +35,7 @@ case @watched_issues.length
<ul>
<% @watched_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>
<% end -%>
View
6 app/views/reminder_all/reminder_all.text.plain.rhtml
@@ -8,7 +8,7 @@ case @assigned_issues.length
<% end -%>
<% @assigned_issues.each do |issue| -%>
-* <%= "#{issue.project} - #{issue.tracker} ##{issue.id}: #{issue.subject}" %>
+* <%= issue.due_date %> - <%= "#{issue.project} - #{issue.tracker} ##{issue.id}: #{issue.subject}" %>
<% end -%>
<% end
if @auth_issues.length > 0
@@ -19,7 +19,7 @@ case @auth_issues.length
<% end -%>
<% @auth_issues.each do |issue| -%>
-* <%= "#{issue.project} - #{issue.tracker} ##{issue.id}: #{issue.subject}" %>
+* <%= issue.due_date %> - <%= "#{issue.project} - #{issue.tracker} ##{issue.id}: #{issue.subject}" %>
<% end -%>
<% end
if @watched_issues.length > 0
@@ -31,7 +31,7 @@ case @watched_issues.length
<% @watched_issues.each do |issue| -%>
-* <%= "#{issue.project} - #{issue.tracker} ##{issue.id}: #{issue.subject}" %>
+* <%= issue.due_date %> - <%= "#{issue.project} - #{issue.tracker} ##{issue.id}: #{issue.subject}" %>
<% end -%>
<% end -%>
View
9 lib/tasks/reminder_all.rake
@@ -130,6 +130,15 @@ class Reminder_all < Mailer
sent_issues += issues
end
else
+ if assigned_tasks.length > 0 then
+ assigned_tasks.sort! {|a,b| b.due_date <=> a.due_date }
+ end
+ if auth_tasks.length > 0 then
+ auth_tasks.sort! {|a,b| b.due_date <=> a.due_date }
+ end
+ if watched_tasks.length > 0 then
+ watched_tasks.sort! {|a,b| b.due_date <=> a.due_date }
+ end
deliver_reminder_all(previous_user, assigned_tasks, auth_tasks, watched_tasks, days) unless previous_user.nil?
watched_tasks.clear
auth_tasks.clear
Please sign in to comment.
Something went wrong with that request. Please try again.