Defect #28343

Error to save custom query

Added by Brice Beaumesnil over 1 year ago. Updated over 1 year ago.

Status:NewStart date:
Priority:HighDue date:
Assignee:-% Done:

0%

Category:Issues filter
Target version:-
Resolution: Affected version:3.4.4

Description

When i want to save a custom query, the sort_criteria saved in database is wrong.
And i have this error :

ActionView::Template::Error (undefined method `+' for nil:NilClass):
    1: <%= hidden_field_tag 'set_filter', '1' %>
    2: <%= hidden_field_tag 'type', @query.type, :disabled => true, :id => 'query_type' %>
    3: <%= query_hidden_sort_tag(@query) %>
    4:
    5: <div id="query_form_with_buttons" class="hide-when-print">
    6: <div id="query_form_content">
  lib/redmine/sort_criteria.rb:35:in `block in to_param'
  lib/redmine/sort_criteria.rb:35:in `collect'
  lib/redmine/sort_criteria.rb:35:in `to_param'
  app/helpers/queries_helper.rb:372:in `query_hidden_sort_tag'
  app/views/queries/_query_form.html.erb:3:in `_3dab2d6c79ffe592a7e685bf7851a687'
  app/views/issues/index.html.erb:11:in `block in _f2c5feeaee6cbb1d8e600dad9df23bd6'
  app/views/issues/index.html.erb:10:in `_f2c5feeaee6cbb1d8e600dad9df23bd6'
  app/controllers/issues_controller.rb:51:in `block (2 levels) in index'
  app/controllers/issues_controller.rb:46:in `index'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

The value used to be : --- []
but i have :

---
- - 
  - asc
- - 
  - asc
- - 
  - asc

Or if i select just one sort item :

---
- - id
  - desc
- - 
  - asc
- - 
  - asc

History

#1 Updated by shweta singh over 1 year ago

it can be saved by the following code

#2 Updated by Bernhard Rohloff over 1 year ago

Please have a look at the guidelines for submissions to describe your defect more precisely.

#3 Updated by Go MAEDA over 1 year ago

  • Description updated (diff)

Also available in: Atom PDF