Defect #828

Files displayed in Projects::Activity view shows title twice, but no description

Added by Marty McGee almost 10 years ago. Updated over 9 years ago.

Status:ClosedStart date:2008-03-11
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:0.7
Resolution:Fixed Affected version:

Description

When viewing the Activity page, anytime a file is displayed in the latest activity, the description doesn't show properly, i.e., it shows the title again, not the description. Here's the affected code in apps/views/projects/activity.rhtml, lines 7-14:

7:  <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| ->
8:   <dt class="<
= e.class.name.downcase >"><span class="time"><= format_time(e.event_datetime, false) ></span>
9:   <
= link_to h(truncate(e.event_title, 100)), e.event_url ></dt>
10:  <dd><
unless e.event_description.blank? ->
11:  <span class="description">*<
= format_activity_description(e.event_description) >*</span><br />
12:  <
end >
13:  <span class="author"><
= e.event_author if e.respond_to?(:event_author) ></span></dd>
14: <
end -%>

Even though this code looks right, the file is displayed like this...

[Time] 10:42 PM [Title] File_Title_Example.jpg
   [Title] File_Title_Example.jpg
   [Author] Marty McGee

but should be displayed like this...

[Time] 10:42 PM [Title] File_Title_Example.jpg
   [Description] File Description Example
   [Author] Marty McGee

History

#1 Updated by Jean-Philippe Lang almost 10 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Fixed in r1227. The attachment description is now displayed in the activity view.

#2 Updated by Laradji nacer over 9 years ago

  • Status changed from Closed to Reopened
  • Target version set to 0.7

I think i have the same problem from .

I have update from 0.6 to 0.7-stable branch in dev.

ActionView::TemplateError (undefined method `description' for #<Attachment:0xb7151b40>) on line #11 of projects/activity.rhtml:
8: <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| ->
9: <dt class="<%= e.class.name.downcase %>"><span class="time"><%= format_time(e.event_datetime, false) %></span>
10: <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %> <%= link_to h(truncate(e.event_title, 100)), e.event_url %></dt>
11: <dd><
unless e.event_description.blank? ->
12: <span class="description"><%= format_activity_description(e.event_description) %></span><br />
13: <
end %>
14: <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></dd>

sh-3.1# svn update
À la révision 1315.

#3 Updated by Laradji nacer over 9 years ago

Can you close it? its my bad forget to update the db. :)

#4 Updated by Thomas Lecavelier over 9 years ago

  • Status changed from Reopened to Closed

Solved on IRC, user forgot to migrate its database.

Also available in: Atom PDF