Commit 5fe1b417 authored by jplang's avatar jplang

Only show issue details in time entry activity events if the issue is visible (#23803).

Patch by Holger Just.

git-svn-id: https://svn.redmine.org/redmine/trunk@16284 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent e6528cba
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment