From c297b9b10afab8504880509bda9d36d527c3adf5 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 25 Oct 2024 08:19:08 +0100 Subject: [PATCH] Bug 38222: (QA follow-up) Add av category update Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../data/mysql/atomicupdate/bug_38222.pl | 20 +++++++++++++++++++ .../data/mysql/mandatory/auth_val_cat.sql | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_38222.pl diff --git a/installer/data/mysql/atomicupdate/bug_38222.pl b/installer/data/mysql/atomicupdate/bug_38222.pl new file mode 100644 index 0000000000..f85bf46320 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_38222.pl @@ -0,0 +1,20 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); + +return { + bug_number => "38222", + description => "Add cancellation reasons to bookings", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO authorised_value_categories (category_name, is_system) + VALUES + ('BOOKING_CANCELLATION', 1) + } + ); + say_success( $out, "Added BOOKING_CANCELLATION AV category" ); + }, +}; diff --git a/installer/data/mysql/mandatory/auth_val_cat.sql b/installer/data/mysql/mandatory/auth_val_cat.sql index be8ef55bff..c1428e4a3c 100644 --- a/installer/data/mysql/mandatory/auth_val_cat.sql +++ b/installer/data/mysql/mandatory/auth_val_cat.sql @@ -101,3 +101,8 @@ INSERT IGNORE INTO authorised_value_categories (category_name, is_system) VALUES ('TICKET_STATUS', 1), ('TICKET_RESOLUTION', 1); + +-- For bookings +INSERT IGNORE INTO authorised_value_categories (category_name, is_system) +VALUES + ('BOOKING_CANCELLATION', 1); -- 2.39.5