Actions
Patch #2724
closedDisplay attachment names in email notifications
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email notifications
Target version:
-
Start date:
2009-02-12
Due date:
% Done:
0%
Estimated time:
Description
If a ticket is created with an attachment, no such information is displayed in the email notification. The patch below adds such a line to email.
Index: app/models/attachment.rb =================================================================== --- app/models/attachment.rb (revision 2451) +++ app/models/attachment.rb (working copy) @@ -118,6 +118,10 @@ self.filename =~ /\.(patch|diff)$/i end + def to_s + self.filename + end + private def sanitize_filename(value) # get only the filename, not the whole path Index: app/views/mailer/_issue_text_plain.rhtml =================================================================== --- app/views/mailer/_issue_text_plain.rhtml (revision 2451) +++ app/views/mailer/_issue_text_plain.rhtml (working copy) @@ -7,6 +7,7 @@ <%=l(:field_assigned_to)%>: <%= issue.assigned_to %> <%=l(:field_category)%>: <%= issue.category %> <%=l(:field_fixed_version)%>: <%= issue.fixed_version %> +<% if issue.attachments.size > 0 %><li><%=l(:label_attachment)%>: <%= issue.attachments.join(", ") %></li><% end %> <% issue.custom_values.each do |c| %><%= c.custom_field.name %>: <%= show_value(c) %> <% end %> Index: app/views/mailer/_issue_text_html.rhtml =================================================================== --- app/views/mailer/_issue_text_html.rhtml (revision 2451) +++ app/views/mailer/_issue_text_html.rhtml (working copy) @@ -7,6 +7,7 @@ <li><%=l(:field_assigned_to)%>: <%= issue.assigned_to %></li> <li><%=l(:field_category)%>: <%= issue.category %></li> <li><%=l(:field_fixed_version)%>: <%= issue.fixed_version %></li> +<% if issue.attachments.size > 0 %><li><%=l(:label_attachment)%>: <%= issue.attachments.join(", ") %></li><% end %> <% issue.custom_values.each do |c| %> <li><%= c.custom_field.name %>: <%= show_value(c) %></li> <% end %>
Related issues
Actions