mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 19:47:14 +00:00
git-svn-id: http://svn.redmine.org/redmine/trunk@21387 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
4807beaebf
commit
146097c610
@ -79,11 +79,17 @@ class IssueQuery < Query
|
||||
|
||||
def self.default(project: nil, user: User.current)
|
||||
query = nil
|
||||
if user&.logged?
|
||||
query = find_by_id user.pref.default_issue_query
|
||||
# user default
|
||||
if user&.logged? && (query_id = user.pref.default_issue_query)
|
||||
query = find_by(id: query_id)
|
||||
end
|
||||
# project default
|
||||
query ||= project&.default_issue_query
|
||||
query || find_by_id(Setting.default_issue_query)
|
||||
# global default
|
||||
if query.nil? && (query_id = Setting.default_issue_query).present?
|
||||
query = find_by(id: query_id)
|
||||
end
|
||||
query
|
||||
end
|
||||
|
||||
def initialize(attributes=nil, *args)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user