Bugzilla – Attachment 80813 Details for
Bug 21597
Test suite is still failing with new default SQL modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21597: Field 'amount' doesn't have a default value
Bug-21597-Field-amount-doesnt-have-a-default-value.patch (text/plain), 3.07 KB, created by
Jonathan Druart
on 2018-10-18 12:10:31 UTC
(
hide
)
Description:
Bug 21597: Field 'amount' doesn't have a default value
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-10-18 12:10:31 UTC
Size:
3.07 KB
patch
obsolete
>From 103ecdb521d83c42fe9f8a45af09038792e903a8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 17 Oct 2018 19:11:29 -0300 >Subject: [PATCH] Bug 21597: Field 'amount' doesn't have a default value > >Fix t/db_dependent/Accounts.t > >Default value could be 0, or left as it. >It seems that the different initialisation we have in the code pass a >value for 'amount' > >account_offsets.amount > `amount` decimal(26,6) NOT NULL, > >DBIx::Class::Storage::DBI::_dbh_execute(): Field 'amount' doesn't >have a default value at /home/vagrant/kohaclone/Koha/Object.pm line 125 >--- > t/db_dependent/Accounts.t | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t >index 26a789c96a..26a2957706 100644 >--- a/t/db_dependent/Accounts.t >+++ b/t/db_dependent/Accounts.t >@@ -816,7 +816,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { > > my $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store(); > my $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => -5 })->store(); >- my $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment' })->store(); >+ my $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment', amount => 0 })->store(); > purge_zero_balance_fees( 1 ); > my $debit_2 = Koha::Account::Lines->find( $debit->id ); > my $credit_2 = Koha::Account::Lines->find( $credit->id ); >@@ -826,7 +826,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { > > $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 5 })->store(); > $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store(); >- $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment' })->store(); >+ $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment', amount => 0 })->store(); > purge_zero_balance_fees( 1 ); > $debit_2 = $credit_2 = undef; > $debit_2 = Koha::Account::Lines->find( $debit->id ); >@@ -837,7 +837,7 @@ subtest "Koha::Account::non_issues_charges tests" => sub { > > $debit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store(); > $credit = Koha::Account::Line->new({ borrowernumber => $patron->id, date => '1900-01-01', amountoutstanding => 0 })->store(); >- $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment' })->store(); >+ $offset = Koha::Account::Offset->new({ credit_id => $credit->id, debit_id => $debit->id, type => 'Payment', amount => 0 })->store(); > purge_zero_balance_fees( 1 ); > $debit_2 = Koha::Account::Lines->find( $debit->id ); > $credit_2 = Koha::Account::Lines->find( $credit->id ); >-- >2.11.0
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 21597
:
80812
|
80813
|
80814
|
80815
|
80816
|
80821
|
80829
|
80830
|
80831
|
80832
|
80833
|
80834
|
80852
|
80853
|
80854
|
80855
|
80856
|
80857