summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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