After upgrade to 2.2.2 ticket list on some projects fails
|Assignee:||Jean-Philippe Lang||% Done:|
On some projects I get just a 500 error with following debug output:
Completed 500 Internal Server Error in 145ms ActionView::Template::Error (comparison of Array with Array failed): 20: </td> 21: <td class="add-filter"> 22: <%= label_tag('add_filter_select', l(:label_filter_add)) %> 23: <%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %> 24: </td> 25: </tr> 26: </table> app/helpers/queries_helper.rb:27:in `sort' app/helpers/queries_helper.rb:27:in `filters_options' app/helpers/queries_helper.rb:22:in `filters_options_for_select' app/views/queries/_filters.html.erb:23:in `_app_views_queries__filters_html_erb__1987712775818747131_9018920' app/views/issues/index.html.erb:18:in `block in _app_views_issues_index_html_erb___3250084186343222987_10921720' app/views/issues/index.html.erb:11:in `_app_views_issues_index_html_erb___3250084186343222987_10921720' app/controllers/issues_controller.rb:83:in `block (2 levels) in index' app/controllers/issues_controller.rb:82:in `index'
In development environment I tried to empty the queries table, does not help. The hint from boards about this did not help for me.
So I did a workaround changing
app/helpers/queries_helper.rb and replaced line 27 with
sorted_options = query.available_filters do |a, b|
I have no idea whats going wrong, it does not happen on all projects and does not depend on any queries stored. I'd upgraded from redmine 1.4.x to 2.2.2, all other stuff is working.
Refactor: use an ordered hash to store available filters and remove :order option (#13154).
#2 Updated by Jean-Philippe Lang almost 10 years ago
- Status changed from New to Resolved
- Assignee set to Jean-Philippe Lang
- Target version set to 2.3.0
- Resolution set to Fixed
Could not reproduce but got the same error when :order key was missing in query filters.
This should no longer happen after r11372.