Also passed project explicitely to hook

Part of implementing https://www.openproject.org/issues/1907