Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. Search ''all'' by default?

Search ''all'' by default?

Added by 👁 Erhan Şahin almost 6 years ago

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!


Replies (1)

RE: Search ''all'' by default? - Added by 👁 Erhan Şahin almost 6 years ago

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.

  • (1 - 1/1)
Loading...