Actions
Maintenance #3051
closedxmera Omnia - Collection #3083: Update to RM 5.1.7
Check query
Start date:
03/17/2025
Due date:
03/17/2025
% Done:
100%
Estimated time:
Compatible Redmine Version:
5.1.z
Pull Request Link:
Description
diff --git a/app/models/query.rb b/app/models/query.rb
index 980976e5f..219967463 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -346,6 +346,8 @@ class Query < ActiveRecord::Base
# Permission required to view the queries, set on subclasses.
class_attribute :view_permission
+ class_attribute :layout, default: 'base'
+
# Scope of queries that are global or on the given project
scope :global_or_on_project, (lambda do |project|
where(:project_id => (project.nil? ? nil : [nil, project.id]))
@@ -994,7 +996,7 @@ class Query < ActiveRecord::Base
end
end
- if field == 'project_id' || (self.type == 'ProjectQuery' && %w[id parent_id].include?(field))
+ if field == 'project_id' || (is_a?(ProjectQuery) && %w[id parent_id].include?(field))
if v.delete('mine')
v += User.current.memberships.map {|m| m.project_id.to_s}
end
Actions