Skip to content

CFM-274_Breadcrumb_Component_External_Identity_Source_Record #207

Expand Up @@ -449,9 +449,11 @@ public function search(
while(($data = fgetcsv($handle)) !== false) {
// strtolower, previous behavior was full string only so dupe that

$match = array_search(strtolower($searchAttrs['q']), array_map('strtolower', $data));
$match = collection($data)
->map(fn($value, $key) => strtolower($value ?? ''))
->filter(fn($item, $key) => strtolower($searchAttrs['q']) === $item);

if($match !== false) {
if($match->count() > 0) {
// $match will be the CSV column that matched, but for now we ignore that
// since we just need to know that the row matched somewhere. Note the first
// column is always the SORID.
Expand Down
7 changes: 5 additions & 2 deletions app/resources/locales/en_US/information.po
Expand Up @@ -61,7 +61,10 @@ msgid "ExternalIdentitySources.records"
msgstr "Source Records"

msgid "ExternalIdentitySources.retrieve"
msgstr "This is the current record retrieved directly from the source. <a href="{0}">View the latest record cached by Registry</a>."
msgstr "This is the current record retrieved directly from the source. {0}"

msgid "ExternalIdentitySources.cached"
msgstr "View the latest record cached by Registry"

msgid "ExternalIdentitySources.retrieve.notSynced"
msgstr "This is the current record available directly from the source."
Expand All @@ -70,7 +73,7 @@ msgid "ExternalIdentitySourceRecords.metadata"
msgstr "Metadata"

msgid "ExternalIdentitySourceRecords.view"
msgstr "This is the latest record from the source as cached by Registry. <a href="{0}">Retrieve the current record directly from the source</a>."
msgstr "This is the latest record from the source as cached by Registry. <a href="{0}" target="_top">Retrieve the current record directly from the source</a>."

msgid "ExternalIdentitySources.search.attrs.none"
msgstr "The External Identity Source cannot be searched."
Expand Down
4 changes: 2 additions & 2 deletions app/src/Command/TransmogrifyCommand.php
Expand Up @@ -1308,8 +1308,8 @@ protected function roleSqlSelect(string $tableName): string {
manager_co_person_id,
cou_id,
CASE
WHEN affiliation IS NULL THEN "member"
WHEN affiliation = "" THEN "member"
WHEN affiliation IS NULL THEN 'member'
WHEN affiliation = '' THEN 'member'
ELSE affiliation
END as affiliation,
title,
Expand Down