Project

General

Profile

Defect #37268 » custom_field_visibility_fix_v2.patch

Alexander Meindl, 2022-06-22 07:56

View differences:

app/models/query.rb
1160 1160
      where = "(#{where}) AND #{db_table}.#{db_field} <> ''"
1161 1161
    end
1162 1162
    "#{queried_table_name}.#{customized_key} #{not_in} IN (" \
1163
      "SELECT #{customized_class.table_name}.id FROM #{customized_class.table_name}" \
1163
      "SELECT #{customized_class.table_name}.id FROM #{customized_class.table_name} AS cf_issue" \
1164 1164
      " LEFT OUTER JOIN #{db_table} ON #{db_table}.customized_type='#{customized_class}'" \
1165
      " AND #{db_table}.customized_id=#{customized_class.table_name}.id" \
1165
      " AND #{db_table}.customized_id=cf_issue.id" \
1166
      " AND #{customized_class.table_name}.id=cf_issue.id " \
1166 1167
      " AND #{db_table}.custom_field_id=#{custom_field_id}" \
1167 1168
      " WHERE (#{where}) AND (#{filter[:field].visibility_by_project_condition}))"
1168 1169
  end
(2-2/10)