Feature #9909
set default search scope of a project
| Status: | New | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | Search engine | |||
| Target version: | - | |||
| Resolution: |
Description
The default search scope when in a project is now only the selected project.
In my setup there are about 25 different projects, so it is easy if the search scope would always be 'all projects' or 'this and its subprojects'. Is it possible to add a configuration option to enable that?
History
#1 Updated by John Wilcox over 1 year ago
We are using Redmine internally in our organization and the current search function is confusing for our users also. We are using Redmine for task management (e.g. no RCS and code development stuff) and we have built an hierarchy of projects based on the organizational structure. For example, CIO has three departements beneath him and when searching, by default he would like to search every "project" under him. As it now, he has to make too many clicks to get where he wants and on the other hand the default Redmine search method is not suitable for us at all. So if possible, please make it configurable (preferrably redmine-wide).
#2 Updated by Robert Rath about 1 year ago
Actually there does exist this capability already. When searching from the initial search entry field (usually in the top right of the screen) you only have the choice of one project.
When you actually perform the initial search you are taken to the Redmine search page which gives you the option to search one of;
a) current project,
b) my projects, or
c) all projects.
So a nice to have feature change would be to place 'my projects' and 'all projects' in the initial project choice but not actually necessary.
#3 Updated by André Bachmann about 1 month ago
A quick and dirty way to change this Redmine behaviour is to edit apps/controller/search_controller.rb and edit in class SearchController < ApplicationController the various statements (for example, if you want to change the default search scope to global, you should change the else statement from @project to nil).
projects_to_search =
case params[:scope]
when 'all'
nil
when 'my_projects'
User.current.memberships.collect(&:project)
when 'subprojects'
@project ? (@project.self_and_descendants.active.all) : nil
else
#@project
nil
end