summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-29 10:46:15 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-29 10:46:15 +0000
commit0807506e18b8e7f2fdee0dfe75f4bb969559d897 (patch)
treed1863b43aa1302ed850fb75fa5e377525537379e /app
parenta5d45534b865e649a6299868c63d75a84413492a (diff)
downloadredmine-0807506e18b8e7f2fdee0dfe75f4bb969559d897.tar.gz
redmine-0807506e18b8e7f2fdee0dfe75f4bb969559d897.zip
Merged r16284 (#23803).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@16303 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/time_entry.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb
index 431c1a554..10b3b4e27 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,