LP#1950394: isolate attribute extraction of metarecord
authorGalen Charlton <gmc@equinoxOLI.org>
Tue, 9 Nov 2021 23:22:07 +0000 (18:22 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 4 Jan 2022 16:47:10 +0000 (11:47 -0500)
commitc8f8564cecf6d7447a3e9198d911b479144856b9
tree2238dffde5d54b508433de40a21bdbcf060d358b
parent6b74816f330dc6895993dee047e40a99d197dd04
LP#1950394: isolate attribute extraction of metarecord

This patch ensures that calling the Template Toolkit block
get_marc_attrs() on the metarecord's lead record's MARCXML
does not interfere with attributes already parsed from the
current bib's MARCXML on the record summary page in the Bootstrap
OPAC.

This fixes an issue where electronic resource links could fail to
be displayed under the following conditions:

- the MARC record has an 856 field with ind1 = 4 and ind2 = 0 or 1
  and is NOT a located URI
- the bib is part of a metarecord set with at least one other member
- the master record in the metarecord set does not have 856 fields

To test
-------
[1] Create a setup where two bibs are in the same metarecord set, one
    with 856 fields and one without. Arrange that the one without
    856 fields is the lead record in the metarecord.
[2] View the one that has 856 fields in the Bootstrap OPAC's record
    summary page. Note that the electronic resource links do not
    appear.
[3] Apply the patch and repeat step 2. This time, the links should
    appear.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/templates-bootstrap/opac/parts/record/summary.tt2