diff --git a/app/controllers/repository_columns_controller.rb b/app/controllers/repository_columns_controller.rb index f827b3ef1..254dd5d21 100644 --- a/app/controllers/repository_columns_controller.rb +++ b/app/controllers/repository_columns_controller.rb @@ -35,7 +35,9 @@ class RepositoryColumnsController < ApplicationController end def describe_all - response_json = @repository.repository_columns.map do |column| + response_json = @repository.repository_columns + .where(data_type: Extends::REPOSITORY_ADVANCED_SEARCHABLE_COLUMNS) + .map do |column| { id: column.id, name: escape_input(column.name), diff --git a/config/initializers/extends.rb b/config/initializers/extends.rb index 5ac0882df..54a1ebcc5 100644 --- a/config/initializers/extends.rb +++ b/config/initializers/extends.rb @@ -118,6 +118,21 @@ class Extends } } + REPOSITORY_ADVANCED_SEARCHABLE_COLUMNS = %i( + RepositoryTextValue + RepositoryNumberValue + RepositoryListValue + RepositoryChecklistValue + RepositoryStatusValue + RepositoryAssetValue + RepositoryDateTimeValue + RepositoryDateTimeRangeValue + RepositoryDateValue + RepositoryDateRangeValue + RepositoryTimeValue + RepositoryTimeRangeValue + ) + # Array of preload relations used in search query for repository rows REPOSITORY_ROWS_PRELOAD_RELATIONS = []