プロジェクト

全般

プロフィール

Vote #62819

完了

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

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
-
対象バージョン:
開始日:
2008/03/11
期日:
進捗率:

0%

予定工数:
category_id:
0
version_id:
1
issue_org_id:
828
author_id:
552
assigned_to_id:
0
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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:   

<%= format_time(e.event_datetime, false) %>
9:   <%= link_to h(truncate(e.event_title, 100)), e.event_url %>

10:  
<% unless e.event_description.blank? -%>
11:  <%= format_activity_description(e.event_description) %>

12:  <% end %>
13:  <%= e.event_author if e.respond_to?(:event_author) %>

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


journals

Fixed in r1227. The attachment description is now displayed in the activity view.
--------------------------------------------------------------------------------
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.

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

--------------------------------------------------------------------------------
Solved on IRC, user forgot to migrate its database.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • 対象バージョン0.7_1 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0