From 0a66a4879aa47bfad4a409f13c81f1451da6d16d Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 30 Oct 2022 10:54:20 +0000 Subject: [PATCH] Bug 29145: (QA follow-up) Fix missing bug number in database update and typos Fixes some typos in test and update message that were highlighted by the QA tools. Add missing bug number to the atomic update file. Signed-off-by: Tomas Cohen Arazi --- ...bug_29145-modify_AutoRemoveOverduesRestrictions-syspref.pl | 4 ++-- t/db_dependent/Circulation/MarkIssueReturned.t | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_29145-modify_AutoRemoveOverduesRestrictions-syspref.pl b/installer/data/mysql/atomicupdate/bug_29145-modify_AutoRemoveOverduesRestrictions-syspref.pl index ca210104c4..cee35b39d3 100644 --- a/installer/data/mysql/atomicupdate/bug_29145-modify_AutoRemoveOverduesRestrictions-syspref.pl +++ b/installer/data/mysql/atomicupdate/bug_29145-modify_AutoRemoveOverduesRestrictions-syspref.pl @@ -1,13 +1,13 @@ use Modern::Perl; return { - bug_number => "", + bug_number => "29145", description => "Change type of AutoRemoveOverduesRestrictions system preference", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; # Do you stuffs here $dbh->do(q{UPDATE `systempreferences` SET `type` = 'Choice', `options` = 'no|when_no_overdue|when_no_overdue_causing_debarment', `explanation` = 'Defines if and on what conditions OVERDUES debarments should automatically be lifted when overdue items are returned by the patron.', `value` = CASE `value` WHEN '1' THEN 'when_no_overdue' WHEN '0' THEN 'no' ELSE `value` END WHERE variable = 'AutoRemoveOverduesRestrictions'}); - say $out "Type of AutoRemoveOverduesRestrictions system prefernce has ben changed"; + say $out "Type of AutoRemoveOverduesRestrictions system preference has been changed"; }, } diff --git a/t/db_dependent/Circulation/MarkIssueReturned.t b/t/db_dependent/Circulation/MarkIssueReturned.t index 3f3d6f1e5f..341f09c91e 100755 --- a/t/db_dependent/Circulation/MarkIssueReturned.t +++ b/t/db_dependent/Circulation/MarkIssueReturned.t @@ -245,7 +245,7 @@ subtest 'AutoRemoveOverduesRestrictions' => sub { C4::Circulation::MarkIssueReturned( $patron->borrowernumber, $item_1->itemnumber ); $debarments = Koha::Patron::Debarments::GetDebarments({ borrowernumber => $patron->borrowernumber }); - is( scalar @$debarments, 0, 'OVERDUES debarment is removed if remaning items would not result in patron debarment' ); + is( scalar @$debarments, 0, 'OVERDUES debarment is removed if remaining items would not result in patron debarment' ); $checkout_1 = AddIssue( $patron->unblessed, $item_1->barcode, $ten_days_ago ); # overdue and would trigger debarment -- 2.39.5