From 4c9abcaa71cd652c1aa8c0b395fe5297a38a2a1e 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. --- ...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 c460eece8c..9d8b4c33ea 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.30.2