diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index d15c6bc2..c9a55088 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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 diff --git a/app/models/journal.rb b/app/models/journal.rb index ac141f68..67a3eee3 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -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 index 00000000..c69db223 Binary files /dev/null and b/public/images/ticket_note.png differ diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index d87b3bf2..48a8193e 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -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); }