diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-29 07:54:37 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-29 07:54:37 +0000 |
commit | 868f83fe357ebecdcf466173c809038a3b093742 (patch) | |
tree | c04914b8717a759bd92c51e739f77372171083e9 /app | |
parent | 19d2529faa25f34edeb29ddbfe18db7732bf287b (diff) | |
download | redmine-868f83fe357ebecdcf466173c809038a3b093742.tar.gz redmine-868f83fe357ebecdcf466173c809038a3b093742.zip |
Only show issue details in time entry activity events if the issue is visible (#23803).
Patch by Holger Just.
git-svn-id: http://svn.redmine.org/redmine/trunk@16284 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/time_entry.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb index 09fcfa8a0..241ff2ffc 100644 --- a/app/models/time_entry.rb +++ b/app/models/time_entry.rb @@ -27,7 +27,11 @@ class TimeEntry < ActiveRecord::Base attr_protected :user_id, :tyear, :tmonth, :tweek acts_as_customizable - acts_as_event :title => Proc.new {|o| "#{l_hours(o.hours)} (#{(o.issue || o.project).event_title})"}, + acts_as_event :title => Proc.new { |o| + related = o.issue if o.issue && o.issue.visible? + related ||= o.project + "#{l_hours(o.hours)} (#{related.event_title})" + }, :url => Proc.new {|o| {:controller => 'timelog', :action => 'index', :project_id => o.project, :issue_id => o.issue}}, :author => :user, :group => :issue, |