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

https://www.openproject.org/work_packages/2395

:exclamation: Depends on [OpenProject Core PR 693](https://github.com/opf/openproject/pull/693)