Merge pull request #7543 from rekonder/aj_SCI_10684

Fix global search for assets [SCI-10684]
This commit is contained in:
ajugo 2024-05-09 15:27:13 +02:00 committed by GitHub
commit 795d75bf98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@
<CellTemplate :label=" i18n.t('search.index.updated_at')" :value="row.attributes.updated_at"/>
<CellTemplate :label="i18n.t('search.index.team')" :url="row.attributes.team.url" :value="row.attributes.team.name"/>
<CellTemplate :label="i18n.t(`search.index.${row.attributes.parent.type}`)" :url="row.attributes.parent.url" :value="labelName(row.attributes.parent)"/>
<CellTemplate :label="i18n.t(`search.index.${row.attributes.parent.type}`)" :visible="!!row.attributes.experiment.name"
<CellTemplate :label="i18n.t('search.index.experiment')" :visible="!!row.attributes.experiment.name"
:url="row.attributes.experiment.url" :value="labelName(row.attributes.experiment)"/>
</div>
</div>

View file

@ -191,7 +191,7 @@ class Protocol < ApplicationRecord
distinct.left_joins(steps: [:step_texts, { step_tables: :table },
{ checklists: :checklist_items }, :step_comments])
.where('(protocols.protocol_type IN (?) AND protocols.my_module_id IN (?)) OR (protocols.id IN (?))',
.where('(protocols.protocol_type IN (?) AND protocols.id IN (?)) OR (protocols.id IN (?))',
[Protocol.protocol_types[:unlinked], Protocol.protocol_types[:linked]],
protocol_my_modules, protocol_templates)
.where_attributes_like_boolean(SEARCHABLE_ATTRIBUTES, query, options)