]> source.dussan.org Git - redmine.git/commitdiff
Display issue notes in the activity view (#1509).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 21 Jun 2008 12:32:47 +0000 (12:32 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 21 Jun 2008 12:32:47 +0000 (12:32 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1567 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/projects_controller.rb
app/models/journal.rb
public/images/ticket_note.png [new file with mode: 0644]
public/stylesheets/application.css

index d15c6bc2ab53ac34c1360438b463f9eb4b19d1e1..c9a55088b482d6e4595be2087b2271d0a5a4c8aa 100644 (file)
@@ -258,7 +258,8 @@ class ProjectsController < ApplicationController
       @events += Issue.find(:all, :include => [:project, :author, :tracker], :conditions => cond.conditions)
       
       cond = ARCondition.new(Project.allowed_to_condition(User.current, :view_issues, :project => @project, :with_subprojects => @with_subprojects))
-      cond.add(["#{Journal.table_name}.journalized_type = 'Issue' AND #{JournalDetail.table_name}.prop_key = 'status_id' AND #{Journal.table_name}.created_on BETWEEN ? AND ?", @date_from, @date_to])
+      cond.add(["#{Journal.table_name}.journalized_type = 'Issue' AND #{Journal.table_name}.created_on BETWEEN ? AND ?", @date_from, @date_to])
+      cond.add("#{JournalDetail.table_name}.prop_key = 'status_id' OR #{Journal.table_name}.notes <> ''")
       @events += Journal.find(:all, :include => [{:issue => :project}, :details, :user], :conditions => cond.conditions)
     end
     
index ac141f68cb2d33c1713860abd94e8fabfcb0fe40..67a3eee3bea04b56045e86a7ee85c6248f85109f 100644 (file)
@@ -33,7 +33,7 @@ class Journal < ActiveRecord::Base
   acts_as_event :title => Proc.new {|o| status = ((s = o.new_status) ? " (#{s})" : nil); "#{o.issue.tracker} ##{o.issue.id}#{status}: #{o.issue.subject}" },
                 :description => :notes,
                 :author => :user,
-                :type => Proc.new {|o| (s = o.new_status) && s.is_closed? ? 'issue-closed' : 'issue-edit' },
+                :type => Proc.new {|o| (s = o.new_status) ? (s.is_closed? ? 'issue-closed' : 'issue-edit') : 'issue-note' },
                 :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.issue.id, :anchor => "change-#{o.id}"}}
 
   def save
diff --git a/public/images/ticket_note.png b/public/images/ticket_note.png
new file mode 100644 (file)
index 0000000..c69db22
Binary files /dev/null and b/public/images/ticket_note.png differ
index d87b3bf2bd87f39d35513291ab3385c7e62d8562..48a8193e23964e4200bb4275283e94f02c5a5322 100644 (file)
@@ -190,6 +190,7 @@ div#activity dd span.description, #search-results dd span.description { display:
 dt.issue { background-image: url(../images/ticket.png); }
 dt.issue-edit { background-image: url(../images/ticket_edit.png); }
 dt.issue-closed { background-image: url(../images/ticket_checked.png); }
+dt.issue-note { background-image: url(../images/ticket_note.png); }
 dt.changeset { background-image: url(../images/changeset.png); }
 dt.news { background-image: url(../images/news.png); }
 dt.message { background-image: url(../images/message.png); }