From 5dee1a636d4c0ce1fa9620dff1d3d212e65ec73c Mon Sep 17 00:00:00 2001 From: Mark Hofstetter Date: Sun, 25 Apr 2021 17:47:11 +0200 Subject: [PATCH] Bug 28166: optionally add marc fields to authority search this patch creates a new syspref: AdditionalFieldsInZ3950AuthResultSearch, analogous to AdditionalFieldsInZ3950ResultSearch if this syspref is populated with with comma separated marc fields (eg '100, 400') those fields are displayed in in the z3950_auth_search C4/Breeding.pm was slightly modified to be able to use "_add_custom_field_rowdata" to add the additonal fields koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt was modified to display the "Addtional fields" conditionally testing: - add set values to AdditionalFieldsInZ3950AuthResultSearch the should show up in the auth_search - AdditionalFieldsInZ3950ResultSearch should also be tested as it is also concerned --- C4/Breeding.pm | 2 + ...lFieldsInZ3950ResultAuthSearch_syspref.sql | 1 - .../admin/preferences/cataloguing.pref | 74 ++++++++++--------- .../modules/cataloguing/z3950_auth_search.tt | 2 +- 4 files changed, 44 insertions(+), 35 deletions(-) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index d00f4714e1..f0779be21b 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -620,6 +620,8 @@ sub Z3950SearchAuth { my $heading; my $heading_authtype_code; $heading_authtype_code = GuessAuthTypeCode($marcrecord); + next if ( not defined $heading_authtype_code ); + $heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marcrecord }); my $breedingid = ImportBreedingAuth( $marcrecord, $serverhost[$k], $encoding[$k], $heading ); diff --git a/installer/data/mysql/atomicupdate/bug_28166-add_AdditionalFieldsInZ3950ResultAuthSearch_syspref.sql b/installer/data/mysql/atomicupdate/bug_28166-add_AdditionalFieldsInZ3950ResultAuthSearch_syspref.sql index 7c4d074d83..5e9a32ca19 100644 --- a/installer/data/mysql/atomicupdate/bug_28166-add_AdditionalFieldsInZ3950ResultAuthSearch_syspref.sql +++ b/installer/data/mysql/atomicupdate/bug_28166-add_AdditionalFieldsInZ3950ResultAuthSearch_syspref.sql @@ -2,6 +2,5 @@ $DBversion = 'XXX'; # will be replaced by the RM if( CheckVersion( $DBversion ) ) { $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('AdditionalFieldsInZ3950ResultAuthSearch', '', 'NULL', 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of an auth search Z3950', 'Free')" ); - # Always end with this (adjust the bug info) NewVersion( $DBversion, XXXXX, "Description"); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref index 44a3386d49..6a26ae34f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -9,31 +9,39 @@ Cataloging: - - pref: advancedMARCeditor choices: - yes: "Don't display" - no: Display + 1: "Don't display" + 0: Display - descriptions of fields and subfields in the MARC editor. - - pref: EasyAnalyticalRecords choices: - yes: Display - no: "Don't display" + 1: Display + 0: "Don't display" - "easy ways to create analytical record relationships." - - pref: EnableAdvancedCatalogingEditor default: 0 choices: - yes: Enable - no: "Don't enable" + 1: Enable + 0: "Don't enable" - the advanced cataloging editor. - "
NOTE:" - Currently does not include support for UNIMARC or NORMARC fixed fields. + - + - "When saving in a MARC/MARCXML file in the advanced cataloging editor or exporting from the detail page in the staff interface, use the" + - pref: DefaultSaveRecordFileID + default: biblionumber + choices: + controlnumber: "control number" + biblionumber: "bibliographic record number" + - "in the file name." Spine labels: - - When using the quick spine label printer, - pref: SpineLabelAutoPrint choices: - yes: do - no: "don't" + 1: do + 0: "don't" - automatically pop up a print dialog. - - "Include the following fields on a quick-printed spine label:" @@ -43,8 +51,8 @@ Cataloging: - - pref: SpineLabelShowPrintOnBibDetails choices: - yes: Display - no: "Don't display" + 1: Display + 0: "Don't display" - buttons on the bibliographic details page to print item spine labels. - Record structure: @@ -55,7 +63,7 @@ Cataloging: - - "Fill in the default country code for field 008 Range 15-17 of MARC21 - Place of publication, production, or execution. (See MARC Code List for Countries):" - pref: DefaultCountryField008 - - " Empty defaults to xxu for United States." + - " Empty defaults to ||| - No attempt to code." - - Interpret and store MARC records in the - pref: marcflavour @@ -68,8 +76,8 @@ Cataloging: - Use the item type of the - pref: item-level_itypes choices: - yes: specific item - no: bibliographic record + 1: specific item + 0: bibliographic record - as the authoritative item type (for determining circulation and fines rules, for displaying an item type icon on either opac detail or results page, etc). - - Map the MARC subfields @@ -94,8 +102,8 @@ Cataloging: - - pref: z3950NormalizeAuthor choices: - yes: Copy - no: "Don't copy" + 1: Copy + 0: "Don't copy" - authors from the UNIMARC - pref: z3950AuthorAuthFields class: multi @@ -113,8 +121,8 @@ Cataloging: - When a new item is added, - pref: PrefillItem choices: - yes: the new item is prefilled with last created item values. - no: the new item is not prefilled with last created item values. + 1: the new item is prefilled with last created item values. + 0: the new item is not prefilled with last created item values. - - "Define a list of subfields to use when prefilling items (separated by space):" - pref: SubfieldsToUseWhenPrefill @@ -163,8 +171,8 @@ Cataloging: - - pref: UseControlNumber choices: - yes: Use - no: "Don't use" + 1: Use + 0: "Don't use" - record control number ($w subfields) and control number (001) for linking of bibliographic records. - - Use @@ -177,8 +185,8 @@ Cataloging: - - pref: hide_marc choices: - yes: "Don't display" - no: Display + 1: "Don't display" + 0: Display - MARC tag numbers, subfield codes and indicators in MARC views. - - pref: LabelMARCView @@ -203,8 +211,8 @@ Cataloging: - - pref: OpacSuppression choices: - yes: Hide - no: "Don't hide" + 1: Hide + 0: "Don't hide" - bibliographic records marked as suppressed from OPAC search results. -
Restrict the suppression to IP addresses outside of the IP range - pref: OpacSuppressionByIPRange @@ -213,8 +221,8 @@ Cataloging: -
Redirect the opac detail page for suppressed records to - pref: OpacSuppressionRedirect choices: - yes: "an explanatory page ('This record is blocked')." - no: "the 404 error page ('Not found')." + 1: "an explanatory page ('This record is blocked')." + 0: "the 404 error page ('Not found')." - "
Display the following message on the redirect page for suppressed bibliographic records:" - pref: OpacSuppressionMessage type: textarea @@ -222,8 +230,8 @@ Cataloging: - - pref: SeparateHoldings choices: - yes: Separate - no: "Don't separate" + 1: Separate + 0: "Don't separate" - "items display into two tabs, where the first tab contains items whose" - pref: SeparateHoldingsBranch choices: @@ -240,8 +248,8 @@ Cataloging: - - pref: AcquisitionDetails choices: - yes: Display - no: "Don't display" + 1: Display + 0: "Don't display" - acquisition details on the bibliographic record detail page. - - "Show the following fields for deleted records after a merge:" @@ -257,8 +265,8 @@ Cataloging: - When matching on ISBN with the record import tool, - pref: AggressiveMatchOnISBN choices: - yes: "do" - no: "don't" + 1: "do" + 0: "don't" - attempt to match aggressively by trying all variations of the ISBNs in the imported record as a phrase in the ISBN fields of already cataloged records. - - Display the MARC field/subfields @@ -272,8 +280,8 @@ Cataloging: - When matching on ISSN with the record import tool, - pref: AggressiveMatchOnISSN choices: - yes: "do" - no: "don't" + 1: "do" + 0: "don't" - attempt to match aggressively by trying all variations of the ISSNs in the imported record as a phrase in the ISSN fields of already cataloged records. Exporting: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt index 12b24ef11e..9c9a7cae4d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt @@ -83,7 +83,7 @@ [% IF Koha.Preference('AdditionalFieldsInZ3950ResultAuthSearch') != '' %] Additional fields [% END %] - Actions + Actions [% FOREACH breeding_loo IN breeding_loop %] [% IF ( breeding_loo.breedingid ) %] -- 2.20.1