From 4bff5a81ac8bc829da146f7aa65a22f03dde905d Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 29 Nov 2021 14:59:13 +0000 Subject: [PATCH] Bug 29592: Do not apply defaultvalue to imported record The condition breedingid excludes records from Z3950. Test plan: Import to new or existing record. Verify that defaults are not applied. Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- cataloguing/addbiblio.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 036764417c..f0bfd96708 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -288,9 +288,9 @@ sub create_input { my $index_subfield = CreateKey(); # create a specifique key for each subfield - # Apply optional framework default value when it is a new record + # Apply optional framework default value when it is a new record (and not an import) # Substitute date parts, user name - if ( $value eq '' && !$cgi->param('biblionumber') ) { + if ( $value eq '' && !$cgi->param('biblionumber') && !$cgi->param('breedingid') ) { $value = $tagslib->{$tag}->{$subfield}->{defaultvalue} // q{}; # get today date & replace <>, <>, <>, <
> if provided in the default value -- 2.30.2