Skip to content

Commit

Permalink
[FINNA-1119] MARC: Index publisher numbers in ctrlnum field.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Oct 12, 2023
1 parent 0c85001 commit bce999b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/RecordManager/Finna/Record/Marc.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,15 @@ public function toSolrArray(Database $db = null)
$data['classification_str_mv'] = $data['classification_txt_mv'];
}

// Publisher number
foreach ($this->getPublisherNumbers() as $current) {
$number = $current['id'];
if ('' !== $current['source']) {
$number = '(' . $current['source'] . ')' . $number;
}
$data['ctrlnum'][] = $number;
}

// Original Study Number
$data['ctrlnum'] = [
...(array)$data['ctrlnum'],
Expand Down

0 comments on commit bce999b

Please sign in to comment.