Project

General

Profile

Patch #38319 ยป issue_query.diff

Vincent Robert, 2023-03-02 08:14

View differences:

app/models/issue_query.rb
575 575
        end
576 576
      sw = operator == "!" ? 'NOT' : ''
577 577
      nl = operator == "!" ? "#{Issue.table_name}.assigned_to_id IS NULL OR" : ''
578
      "(#{nl} #{Issue.table_name}.assigned_to_id #{sw} IN (SELECT DISTINCT #{Member.table_name}.user_id FROM #{Member.table_name}, #{MemberRole.table_name}" +
579
        " WHERE #{Member.table_name}.project_id = #{Issue.table_name}.project_id AND #{Member.table_name}.id = #{MemberRole.table_name}.member_id AND #{role_cond}))"
578
      "(#{nl} (#{Issue.table_name}.assigned_to_id, #{Issue.table_name}.project_id) #{sw} IN (" +
579
        " SELECT DISTINCT #{Member.table_name}.user_id, #{Member.table_name}.project_id FROM #{Member.table_name}, #{MemberRole.table_name}" +
580
        " WHERE #{Member.table_name}.id = #{MemberRole.table_name}.member_id AND #{role_cond}))"
580 581
    end
581 582
  end
582 583

  
    (1-1/1)