Skip to content

Commit

Permalink
Ignore case when sorting group-by values
Browse files Browse the repository at this point in the history
  • Loading branch information
nanego committed Nov 23, 2023
1 parent 7140d8e commit 535b014
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/redmine_tiny_features/queries_helper_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def query_available_inline_columns_options(query)
## Get group by coolumns sort by displayed names
def group_by_column_select_tag(query)
options = [[]] + query.groupable_columns
.sort_by { |column| column.caption.to_sym } # Patch: sort by displayed names
.sort_by { |column| column.caption.to_s.parameterize } # Patch: sort by displayed names
.collect { |c| [c.caption, c.name.to_s] }

select_tag('group_by', options_for_select(options, @query.group_by))
Expand Down
2 changes: 1 addition & 1 deletion spec/system/issues_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def log_user(login, password)
expect(page).to have_selector('select', id: 'group_by')

options = page.all('#group_by option').map(&:text)
expect(options).to eq (options.sort)
expect(options).to eq (options.sort_by(&:parameterize))
end
end
end

0 comments on commit 535b014

Please sign in to comment.