From 56de1c94a44702135407c30d318c896b50fd1fcb Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 2 May 2023 18:35:23 +0000 Subject: [PATCH] Bug 33419: Make home library and current library mandatory by default --- .../marc21/mandatory/marc21_framework_DEFAULT.yml | 4 ++-- .../unimarc/mandatory/unimarc_framework_DEFAULT.yml | 2 +- t/db_dependent/selenium/basic_workflow.t | 13 +++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml index c2c50cad2d..73a244e36e 100644 --- a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml +++ b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml @@ -549,7 +549,7 @@ tables: liblibrarian: "Home library" libopac: "Home library" repeatable: 0 - mandatory: 0 + mandatory: 1 kohafield: items.homebranch tab: 10 authorised_value: branches @@ -567,7 +567,7 @@ tables: liblibrarian: "Current library" libopac: "Current library" repeatable: 0 - mandatory: 0 + mandatory: 1 kohafield: items.holdingbranch tab: 10 authorised_value: branches diff --git a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.yml b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.yml index 462c2eecfc..20a1eb4c68 100644 --- a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.yml +++ b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.yml @@ -849,7 +849,7 @@ tables: liblibrarian: "Home library" libopac: "Home library" repeatable: 0 - mandatory: 0 + mandatory: 1 kohafield: items.homebranch tab: 10 authorised_value: branches diff --git a/t/db_dependent/selenium/basic_workflow.t b/t/db_dependent/selenium/basic_workflow.t index 40434f3a75..e0c05bc804 100755 --- a/t/db_dependent/selenium/basic_workflow.t +++ b/t/db_dependent/selenium/basic_workflow.t @@ -131,6 +131,10 @@ SKIP: { $borrowernumber = $dbh->selectcol_arrayref(q|SELECT borrowernumber FROM borrowers WHERE userid=?|, {}, $sample_data->{patron}{userid} )->[0]; my $itemtype = $sample_data->{itemtype}; + + my $homelibrary = $sample_data->{homelibrary}; + + my $currentlibrary = $sample_data->{currentlibrary}; my @biblionumbers; for my $i ( 1 .. $number_of_biblios_to_insert ) { @@ -141,12 +145,16 @@ SKIP: { MARC::Field->new('200', ' ', ' ', a => 'test biblio '.$i), MARC::Field->new('200', ' ', ' ', f => 'test author '.$i), MARC::Field->new('200', ' ', ' ', b => $itemtype->{itemtype}), + MARC::Field->new('200', ' ', ' ', c => $homelibrary->{homelibrary}), + MARC::Field->new('200', ' ', ' ', d => $currentlibrary->{currentlibrary}), ); } else { $biblio->append_fields( MARC::Field->new('245', ' ', ' ', a => 'test biblio '.$i), MARC::Field->new('100', ' ', ' ', a => 'test author '.$i), MARC::Field->new('942', ' ', ' ', c => $itemtype->{itemtype}), + MARC::Field->new('942', ' ', ' ', b => $homelibrary->{homelibrary}), + MARC::Field->new('942', ' ', ' ', d => $currentlibrary->{currentlibrary}), ); } my ($biblionumber, $biblioitemnumber) = AddBiblio($biblio, ''); @@ -211,6 +219,11 @@ SKIP: { ) { next; # auto-filled } + elsif ( + $id =~ m|^tag_952_subfield_a| # homelibrary + ) { + elsif ( =~ m|^tag_952_subfield_b| # currentlibrary + ) { elsif ( $id =~ m|^tag_952_subfield_d| # dateaccessioned ) { -- 2.30.2