Fix work packages sidebar hook after query filter refactoring (#2395)

pull/6827/head
Till Breuer 11 years ago committed by Hagen Schink
parent b97cd3b83a
commit 1e6a6941d2
  1. 1
      doc/CHANGELOG.md
  2. 6
      lib/open_project/backlogs/hooks.rb

@ -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

@ -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

Loading…
Cancel
Save