diff --git a/app/menus/work_packages/menu.rb b/app/menus/work_packages/menu.rb index c8c72798d2e..ca1c96b5992 100644 --- a/app/menus/work_packages/menu.rb +++ b/app/menus/work_packages/menu.rb @@ -65,16 +65,17 @@ module WorkPackages def selected?(query_params) return true if check_for_redirected_urls(query_params) - - if query_params[:work_package_default] && - (%i[filters query_props query_id name].none? { |k| params.key? k }) && - params[:on_work_package_path] == "true" - return true - end + return true if highlight_on_work_packages?(query_params) super end + def highlight_on_work_packages?(query_params) + query_params[:work_package_default] && + (%i[filters query_props query_id name].none? { |k| params.key? k }) && + params[:on_work_package_path] == "true" + end + def ee_upsale_path(query_params) share_upsale_work_packages_path({ name: query_params[:name] }) end