diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-12-03 08:29:44 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-12-03 08:29:44 +0000 |
commit | af1182c8ba64f5b55b52da298ff602f76b0806af (patch) | |
tree | 3d776e56ad7f0b782379eb46122f74f5d1d8b5ff /app/models/time_entry_query.rb | |
parent | adc10e68a915fe1ca601acb9f70ad10285ec36aa (diff) | |
download | redmine-af1182c8ba64f5b55b52da298ff602f76b0806af.tar.gz redmine-af1182c8ba64f5b55b52da298ff602f76b0806af.zip |
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
Diffstat (limited to 'app/models/time_entry_query.rb')
-rw-r--r-- | app/models/time_entry_query.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |