Bugzilla – Attachment 147563 Details for
Bug 32450
Make it possible to exclude debit types from charges counted for circulation restriction (noissuecharge)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32450: (QA follow-up) Fix QA test errors
Bug-32450-QA-follow-up-Fix-QA-test-errors.patch (text/plain), 4.04 KB, created by
Matt Blenkinsop
on 2023-03-01 14:58:35 UTC
(
hide
)
Description:
Bug 32450: (QA follow-up) Fix QA test errors
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-03-01 14:58:35 UTC
Size:
4.04 KB
patch
obsolete
>From 6330108fa99ae4219ced71837540e5323fd486c8 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 1 Mar 2023 14:55:38 +0000 >Subject: [PATCH] Bug 32450: (QA follow-up) Fix QA test errors > >Exec flag added to atomic update file, trailing whitespaces removed >Unit tests patched to remove duplicate variable names >--- > Koha/Account.pm | 2 +- > .../mysql/atomicupdate/bug_32450-add_debit_type_flag.pl | 8 ++++---- > t/db_dependent/Accounts.t | 8 ++++---- > 3 files changed, 9 insertions(+), 9 deletions(-) > mode change 100644 => 100755 installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index 517138fe41f..515189ae7c8 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -709,7 +709,7 @@ Charges can be set as exempt from non-issue by editing the debit type in the Deb > > sub non_issues_charges { > my ($self) = @_; >- >+ > my @blocking_debit_types = Koha::Account::DebitTypes->search({ restricts_checkouts => 1 }, { columns => 'code' })->get_column('code'); > > return $self->lines->search( >diff --git a/installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl b/installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl >old mode 100644 >new mode 100755 >index 91cd3dd20e5..404747061e7 >--- a/installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl >+++ b/installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl >@@ -4,10 +4,10 @@ return { > bug_number => "32450", > description => "Create a database flag for whether a debit type should be included in the noissuescharge block on circulation and remove redundant sysprefs.", > up => sub { >- my ($args) = @_; >+ my ($args) = @_; > my ($dbh, $out) = @$args{qw(dbh out)}; > >- if( !column_exists( 'account_debit_types', 'restricts_checkouts' ) ) { >+ if( !column_exists( 'account_debit_types', 'restricts_checkouts' ) ) { > $dbh->do(q{ > ALTER TABLE account_debit_types ADD COLUMN `restricts_checkouts` tinyint(1) NOT NULL DEFAULT 1 AFTER `archived` > }); >@@ -35,7 +35,7 @@ return { > $sth->execute; > my $exists = $sth->fetchrow(); > $sth->finish; >- >+ > if($exists) { > # If it exists, retrieve its value > my $find_syspref_value = "SELECT value FROM systempreferences WHERE variable = '$_'"; >@@ -66,7 +66,7 @@ return { > # Delete syspref as it is no longer required and the value has been transferred to account_debit_types > my $delete_redundant_syspref = "DELETE FROM systempreferences WHERE variable = '$_'"; > $dbh->do($delete_redundant_syspref); >- >+ > } else { > # If it doesn't exist then revert to default value in the database schema > say $out "$_ was not found in this Koha instance, default value has been applied."; >diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t >index 7b8fbcf3bd7..df53e0704b4 100755 >--- a/t/db_dependent/Accounts.t >+++ b/t/db_dependent/Accounts.t >@@ -835,16 +835,16 @@ subtest "Koha::Account::non_issues_charges tests" => sub { > } > )->store; > >- my ( $total, $non_issues_charges ) = ( $account->balance, $account->non_issues_charges ); >- my $other_charges = $total - $non_issues_charges; >+ my ( $new_total, $new_non_issues_charges ) = ( $account->balance, $account->non_issues_charges ); >+ my $new_other_charges = $new_total - $new_non_issues_charges; > is( > $account->balance, > $res + $rent + $manual + $print, > 'Total charges should be Res + Rent + Manual + Print' > ); >- is( $non_issues_charges, 15, >+ is( $new_non_issues_charges, 15, > 'All types except Print should count towards the non issue charge' ); >- is( $other_charges, 4, 'There should be non-included charges for Print' ); >+ is( $new_other_charges, 4, 'There should be non-included charges for Print' ); > > }; > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32450
:
145080
|
145081
|
145127
|
145128
|
145171
|
145172
|
145189
|
145190
|
145191
|
145194
|
145198
|
147563
|
149653
|
149654
|
149655
|
149656
|
149657
|
149658
|
149659
|
149660
|
149858
|
149859
|
149872
|
149873
|
149874
|
149875
|
149876
|
149877
|
149878
|
149879
|
149880
|
149881
|
149882