summaryrefslogtreecommitdiffstats
path: root/app/models/time_entry_query.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-12-03 08:29:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-12-03 08:29:44 +0000
commitaf1182c8ba64f5b55b52da298ff602f76b0806af (patch)
tree3d776e56ad7f0b782379eb46122f74f5d1d8b5ff /app/models/time_entry_query.rb
parentadc10e68a915fe1ca601acb9f70ad10285ec36aa (diff)
downloadredmine-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.rb6
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