From e44927842b545dab62dccca79a3dcd75f4205591 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 21 Oct 2024 11:51:45 +0200 Subject: [PATCH] Bug 38211: frameworkcode must be set before read It's a stupid global variable, we MUST have this init line BEFORE we read it! Test plan: See the other bugs linked with this one, confirm the test plan for all of them still pass. Test plan for this specific bug report: 1. Cataloging - New record -> Audio Cassettes, CDs 2. Fill in the required fields and save 3. Switch to 'Normal', Edit - Edit record 4. Note that 001 and 003 are not visible, and the Settings menu has a checkmark by Audio Cassettes, CDs 5. Click the browser Back button, then Edit - Edit record 6. Note that 001 and 003 are not visible, and the Settings menu has a checkmark by Audio Cassettes, CDs Signed-off-by: Brendan Lawlor Signed-off-by: Emily Lamancusa Signed-off-by: Katrin Fischer --- cataloguing/addbiblio.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index d7f556e629..985bede9a8 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -515,6 +515,7 @@ my $fa_branch = $input->param('branch'); my $fa_stickyduedate = $input->param('stickyduedate'); my $fa_duedatespec = $input->param('duedatespec'); +$op = $input->param('op') // q{}; $frameworkcode = &GetFrameworkCode($biblionumber) if ( $biblionumber and not( defined $frameworkcode) and $op ne 'cud-addbiblio' ); @@ -539,7 +540,6 @@ $tagslib = &GetMarcStructure( 1, $frameworkcode ); $usedTagsLib = &GetUsedMarcStructure($frameworkcode); $mandatory_z3950 = GetMandatoryFieldZ3950($frameworkcode); $is_a_modif = 0; -$op = $input->param('op') // q{}; $changed_framework = 0; if ( $op eq 'cud-change-framework' ) { -- 2.39.5