diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 98d335adf0..de44205d8f 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -36,6 +36,7 @@ See doc/COPYRIGHT.rdoc for more details. # Changelog +* `#2395` [Work Package Tracking] Internal Error when entering a character in a number field in a filter * Adaptations for new icon font * Fix: Backlog data existence check diff --git a/lib/open_project/backlogs/hooks.rb b/lib/open_project/backlogs/hooks.rb index 7e08e2a1da..f8e87ea313 100644 --- a/lib/open_project/backlogs/hooks.rb +++ b/lib/open_project/backlogs/hooks.rb @@ -55,9 +55,9 @@ module OpenProject::Backlogs::Hooks q = context[:request].session[:query] if q && q[:filters] - sprint = q[:filters]['fixed_version_id'] - if sprint && sprint[:operator] == '=' && sprint[:values].size == 1 - locals[:sprint] = Sprint.find_by_id(sprint[:values][0]) + sprint = q[:filters].detect{|f| f.field == :fixed_version_id} + if sprint && sprint.operator == '=' && sprint.values.size == 1 + locals[:sprint] = Sprint.find_by_id(sprint.values[0]) end end