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

https://www.openproject.org/work_packages/2395