mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 00:06:01 +01:00
You can configure default project queries in the following places (#35795):
* App-level: Administration > Projects > Default query (Projects list defaults section) * User-level: My account > Default project query git-svn-id: http://svn.redmine.org/redmine/trunk@21281 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -51,6 +51,7 @@ class ProjectsController < ApplicationController
|
||||
return
|
||||
end
|
||||
|
||||
retrieve_default_query
|
||||
retrieve_project_query
|
||||
scope = project_scope
|
||||
|
||||
@@ -323,4 +324,19 @@ class ProjectsController < ApplicationController
|
||||
def retrieve_project_query
|
||||
retrieve_query(ProjectQuery, false, :defaults => @default_columns_names)
|
||||
end
|
||||
|
||||
def retrieve_default_query
|
||||
return if params[:query_id].present?
|
||||
return if api_request?
|
||||
return if params[:set_filter] && (params.key?(:op) || params.key?(:f))
|
||||
|
||||
if params[:without_default].present?
|
||||
params[:set_filter] = 1
|
||||
return
|
||||
end
|
||||
|
||||
if default_query = ProjectQuery.default
|
||||
params[:query_id] = default_query.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user