From 2232e624d72371e5c3dee9150c360619a56d7741 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Fri, 21 Jun 2024 11:53:25 -0700 Subject: [PATCH] Bug 37152: Deleting framework tags expects a cud-delete-confirm op instead of delete-confirm The scripts for managing biblio and authority framework tag editing are expecting an op of cud-delete-confirm, but the op that is passed is the correct thing, delete-confirm, because it's a GET of a page where the confirmation will happen, not the later cud- operation. You can only see that the expected op is wrong because the confirmation page doesn't get the description of the tag. Test plan: 1. Without the patch, Administration - MARC bibliographic framework 2. Default framework Actions menu, MARC structure 3. In the row for 025, Actions menu, Delete 4. Note that the page which loads shows "Tag: 025" and "Description:" without actually having a description 5. Administration - Authority types 6. Default authority type Actions menu, MARC structure 7. In the row for 046, Actions menu, Delete 8. Note that the page that loads shows "Tag: 046" without the tag description 9. Apply patch, restart_all 10. With the patch, repeat steps 1-8, but this time note that you see the description of the tag, not just the number. For both, click Yes, delete, and verify that the tag is deleted. --- admin/auth_tag_structure.pl | 2 +- admin/marctagstructure.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index d4b0662588..4bb428ab7a 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -142,7 +142,7 @@ if ($op eq 'add_form') { # END $OP eq ADD_VALIDATE ################## DELETE_CONFIRM ################################## # called by default form, used to confirm deletion of data in DB -} elsif ($op eq 'cud-delete_confirm') { +} elsif ($op eq 'delete_confirm') { $sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from auth_tag_structure where tagfield=?"); $sth->execute($searchfield); my $data=$sth->fetchrow_hashref; diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 1d48076f0f..d342c09733 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -160,7 +160,7 @@ if ($op eq 'add_form') { # END $OP eq ADD_VALIDATE ################## DELETE_CONFIRM ################################## # called by default form, used to confirm deletion of data in DB -} elsif ($op eq 'cud-delete_confirm') { +} elsif ($op eq 'delete_confirm') { $sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,ind1_defaultvalue,ind2_defaultvalue from marc_tag_structure where tagfield=? and frameworkcode=?"); $sth->execute($searchfield, $frameworkcode); my $data = $sth->fetchrow_hashref; -- 2.44.0