summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-21 12:32:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-21 12:32:47 +0000
commitbb1edda6e803c6a91fbcb7941fd619eb55be8d32 (patch)
tree0b888b4219505b54c9c01d181dc6f11ed945ff3a
parentba8a36a39b0aeafd45aeff2a71d5cf689cabaea1 (diff)
downloadredmine-bb1edda6e803c6a91fbcb7941fd619eb55be8d32.tar.gz
redmine-bb1edda6e803c6a91fbcb7941fd619eb55be8d32.zip
Display issue notes in the activity view (#1509).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1567 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/projects_controller.rb3
-rw-r--r--app/models/journal.rb2
-rw-r--r--public/images/ticket_note.pngbin0 -> 784 bytes
-rw-r--r--public/stylesheets/application.css1
4 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index d15c6bc2a..c9a55088b 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 ac141f68c..67a3eee3b 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 000000000..c69db223f
--- /dev/null
+++ b/public/images/ticket_note.png
Binary files differ
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index d87b3bf2b..48a8193e2 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); }