From af1182c8ba64f5b55b52da298ff602f76b0806af Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 3 Dec 2016 08:29:44 +0000 Subject: [PATCH] Don't show project column by default when inside a project. git-svn-id: http://svn.redmine.org/redmine/trunk@16042 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/time_entry_query.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb index 74263ba9c..620847da0 100644 --- a/app/models/time_entry_query.rb +++ b/app/models/time_entry_query.rb @@ -122,7 +122,11 @@ class TimeEntryQuery < Query end def default_columns_names - @default_columns_names ||= [:project, :spent_on, :user, :activity, :issue, :comments, :hours] + @default_columns_names ||= begin + default_columns = [:spent_on, :user, :activity, :issue, :comments, :hours] + + project.present? ? default_columns : [:project] | default_columns + end end def default_totalable_names -- 2.39.5