Project

General

Profile

Actions

Maintenance #3051

closed

xmera Omnia - Collection #3083: Update to RM 5.1.7

Check query

Added by liaham 26 days ago. Updated 22 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
03/17/2025
Due date:
03/17/2025
% Done:

100%

Estimated time:
Compatible Redmine Version:
5.1.z

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 #1

Updated by liaham 22 days ago

  • Due date set to 03/17/2025
  • Status changed from New to Closed
  • Assignee set to liaham
  • Start date set to 03/17/2025
  • % Done changed from 0 to 100
Actions #2

Updated by liaham 22 days ago

  • Parent task set to #3083
Actions

Also available in: Atom PDF