Defect #26537

Column Project is not longer added by default to the list of default columns for time entries

Added by Marius BALTEANU about 1 month ago. Updated about 1 month ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:Marius BALTEANU% Done:

0%

Category:Time tracking
Target version:4.0.0
Resolution: Affected version:

Description

After r16814, the column "Project" is no longer added by default to the list of default columns for time entries in the global view.

To reproduce:
  1. Go to "/time_entries"
  2. Observe that the column Project is missing

For issues#index and before this commit, the columns Project was shown by default in the global view.

Attached is a patch that fixes this.

26537_show_column_project_by_default_time_entries_index.patch Magnifier (5.01 KB) Marius BALTEANU, 2017-08-06 15:04


Related issues

Related to Redmine - Feature #26356: Time entry list: set default column options Closed

History

#1 Updated by Go MAEDA about 1 month ago

Thank you for the patch but the following error occurs if Setting.time_entry_list_defaults[:column_names] is nil. The value is nil in a fresh installation.

Could you fix the patch?

ActionView::Template::Error (undefined method `map' for nil:NilClass):
     6:   <span>
     7:       <%= label_tag available_tag_id, l(:description_available_columns) %>
     8:       <%= select_tag 'available_columns',
     9:               options_for_select(query_available_inline_columns_options(query)),
    10:               :id => available_tag_id,
    11:               :multiple => true, :size => 10,
    12:               :ondblclick => "moveOptions(this.form.#{available_tag_id}, this.form.#{selected_tag_id});" %>

app/models/time_entry_query.rb:102:in `default_columns_names'
app/models/query.rb:677:in `columns'
app/helpers/queries_helper.rb:109:in `query_available_inline_columns_options'
.
.
.

#2 Updated by Marius BALTEANU about 1 month ago

Thanks for finding this issue, I'll take a look these days. Can you assign this ticket to me, please?

#3 Updated by Go MAEDA about 1 month ago

  • Assignee set to Marius BALTEANU

Marius BALTEANU wrote:

I'll take a look these days. Can you assign this ticket to me, please?

Done.

#4 Updated by Marius BALTEANU about 1 month ago

I've fixed the issue by using the same logic implementation from issue default columns.

#5 Updated by Marius BALTEANU about 1 month ago

  • File deleted (show_column_project_by_default_time_entries_index.patch)

#6 Updated by Marius BALTEANU about 1 month ago

  • Related to Feature #26356: Time entry list: set default column options added

#7 Updated by Go MAEDA about 1 month ago

  • Target version set to 4.0.0

LGTM. Setting target version to 4.0.0.
Thank you for fixing this issue.

Also available in: Atom PDF