Bug 8948: Display MARC 787 relationship field
authorNick Clemens <nick@bywatersolutions.com>
Fri, 28 Oct 2022 16:38:22 +0000 (16:38 +0000)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Fri, 17 Feb 2023 12:08:30 +0000 (13:08 +0100)
commit21ea11ff49a8564c09cb310fc77b471265722cfc
treefe911be99478eb1b56d1a0119a5cc7663e164d06
parent96d6449b54ed1ec1b74b2c390ff2daeb7569b423
Bug 8948: Display MARC 787 relationship field

This field is defined similar to 775, as a related work:
https://www.loc.gov/marc/bibliographic/bd787.html

This patch adds a display of this field, linking to the referenced record as the 775 does

It also tests for 580 field, and displays the text there if present, using the 787 a and t subfields otherwise

To test:
1 - Edit the default framework to make 787atw and 580a visible in editor
2 - Add a 787 to a record:
    $tThe ideas behind the chess openings
    $aFine, Reuben<
    $w2470231
3 - Confirm there is no display
4 - Apply patch / restart all
5 - 'Other related works' now shows
6 - Link should be using title of record
7 - Set system preference UseControlNumber to Use
8 - Reload details, link should now use control number
9 - Add a 580 to the record:
    $a This is a friendly work to this one
10 - Confirm the text of the link now displays before the link
11 - Add a second 580, confirm it displays as well
   - there is no seperator as each should end with a period or other punctuation according to MARC
   - there is a dpan with a class surrounding each so styling can be added as desired
12 - Add a second 787
   - confirm seperator present and wrapped in a span with a class
   - confirm each 787 is shown with a span/class for styling

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 18ad260608f3b53cbd6b1aa8581cdc82b5ba6366)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ee236811c29fe1b57582519007676cfa47ef90fd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl