Content
Search ''all'' by default?
Started June 27, 2019 08:32 · 1 reply · 1 participant
Hello everyone,
does anyone know how I can change following search function behaviour?
When I search for a word, I want the results to show the "All" tab by default. I guess this functionality is not directly builtin and I need to modify the sourcecode.
Do I need to change openproject/app/controllers/search_controller.rb ?
Thanks for your help!
Solution is in global-search.service.ts: Line 42
// Default selected tab is Work Packages
private _currentTab = new BehaviorSubject<any>('all');
and also change search_controller.rb Line 192 change to:
available_search_types = Redmine::Search.available_search_types.dup.unshift('all')
I copied it to /app/frontend/src/app/modules/global_search/global-search.service.ts and precompiled the assets. The precompile-assets script is in the github repo under /docker.