Bugzilla – Attachment 71451 Details for
Bug 20144
Test suite is failing with new default SQL modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20144: [sql_modes] Remove 'Null' string values from GetHardDueDate.t
Bug-20144-sqlmodes-Remove-Null-string-values-from-.patch (text/plain), 5.26 KB, created by
Julian Maurice
on 2018-02-12 12:05:35 UTC
(
hide
)
Description:
Bug 20144: [sql_modes] Remove 'Null' string values from GetHardDueDate.t
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-02-12 12:05:35 UTC
Size:
5.26 KB
patch
obsolete
>From f0f40e0fb4aa7c031011056b2dbda72626a2aeae Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 6 Feb 2018 12:26:56 -0300 >Subject: [PATCH] Bug 20144: [sql_modes] Remove 'Null' string values from > GetHardDueDate.t > >Must be undef or correct integer value > >Fix for: >Incorrect integer value: 'Null' for column 'enrolmentperiod' > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/Circulation/GetHardDueDate.t | 76 ++++++++++++++--------------- > 1 file changed, 38 insertions(+), 38 deletions(-) > >diff --git a/t/db_dependent/Circulation/GetHardDueDate.t b/t/db_dependent/Circulation/GetHardDueDate.t >index c2b831fd89..b5a571b589 100644 >--- a/t/db_dependent/Circulation/GetHardDueDate.t >+++ b/t/db_dependent/Circulation/GetHardDueDate.t >@@ -78,17 +78,17 @@ Koha::Library->new($samplebranch2)->store; > my $samplecat = { > categorycode => 'CAT1', > description => 'Description1', >- enrolmentperiod => 'Null', >- enrolmentperioddate => 'Null', >- dateofbirthrequired => 'Null', >- finetype => 'Null', >- bulk => 'Null', >- enrolmentfee => 'Null', >- overduenoticerequired => 'Null', >- issuelimit => 'Null', >- reservefee => 'Null', >+ enrolmentperiod => undef, >+ enrolmentperioddate => undef, >+ dateofbirthrequired => undef, >+ finetype => undef, >+ bulk => undef, >+ enrolmentfee => undef, >+ overduenoticerequired => undef, >+ issuelimit => undef, >+ reservefee => undef, > hidelostitems => 0, >- category_type => 'Null' >+ category_type => 'A', > }; > my $query = > "INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,dateofbirthrequired ,finetype,bulk,enrolmentfee,overduenoticerequired,issuelimit ,reservefee ,hidelostitems ,category_type) VALUES( ?,?,?,?,?,?,?,?,?,?,?,?,?)"; >@@ -114,7 +114,7 @@ my $default = { > #Test GetIssuingRule > my $sampleissuingrule1 = { > reservecharge => '0.000000', >- chargename => 'Null', >+ chargename => undef, > restrictedtype => 0, > accountsent => 0, > maxissueqty => 5, >@@ -132,7 +132,7 @@ my $sampleissuingrule1 = { > hardduedate => '2013-01-01', > branchcode => $samplebranch1->{branchcode}, > fine => '0.000000', >- hardduedatecompare => 5, >+ hardduedatecompare => 0, > overduefinescap => '0.000000', > renewalsallowed => 0, > firstremind => 0, >@@ -153,26 +153,26 @@ my $sampleissuingrule2 = { > itemtype => 'BOOK', > maxissueqty => 2, > maxonsiteissueqty => 1, >- renewalsallowed => 'Null', >+ renewalsallowed => 0, > renewalperiod => 2, > norenewalbefore => 7, > auto_renew => 0, >- reservesallowed => 'Null', >+ reservesallowed => 0, > issuelength => 2, > lengthunit => 'days', >- hardduedate => 2, >- hardduedatecompare => 'Null', >- fine => 'Null', >- finedays => 'Null', >- firstremind => 'Null', >- chargeperiod => 'Null', >+ hardduedate => undef, >+ hardduedatecompare => 0, >+ fine => undef, >+ finedays => undef, >+ firstremind => undef, >+ chargeperiod => undef, > chargeperiod_charge_at => 0, > rentaldiscount => 2.00, >- overduefinescap => 'Null', >- accountsent => 'Null', >- reservecharge => 'Null', >- chargename => 'Null', >- restrictedtype => 'Null', >+ overduefinescap => undef, >+ accountsent => undef, >+ reservecharge => undef, >+ chargename => undef, >+ restrictedtype => undef, > maxsuspensiondays => 0, > onshelfholds => 1, > opacitemholds => 'Y', >@@ -186,26 +186,26 @@ my $sampleissuingrule3 = { > itemtype => 'DVD', > maxissueqty => 3, > maxonsiteissueqty => 2, >- renewalsallowed => 'Null', >+ renewalsallowed => 0, > renewalperiod => 3, > norenewalbefore => 8, > auto_renew => 0, >- reservesallowed => 'Null', >+ reservesallowed => 0, > issuelength => 3, > lengthunit => 'days', >- hardduedate => 3, >- hardduedatecompare => 'Null', >- fine => 'Null', >- finedays => 'Null', >- firstremind => 'Null', >- chargeperiod => 'Null', >+ hardduedate => undef, >+ hardduedatecompare => 0, >+ fine => undef, >+ finedays => undef, >+ firstremind => undef, >+ chargeperiod => undef, > chargeperiod_charge_at => 0, > rentaldiscount => 3.00, >- overduefinescap => 'Null', >- accountsent => 'Null', >- reservecharge => 'Null', >- chargename => 'Null', >- restrictedtype => 'Null', >+ overduefinescap => undef, >+ accountsent => undef, >+ reservecharge => undef, >+ chargename => undef, >+ restrictedtype => undef, > maxsuspensiondays => 0, > onshelfholds => 1, > opacitemholds => 'F', >-- >2.14.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 20144
:
71410
|
71411
|
71412
|
71413
|
71414
|
71415
|
71416
|
71417
|
71418
|
71419
|
71420
|
71421
|
71422
|
71423
|
71424
|
71425
|
71427
|
71428
|
71429
|
71430
|
71431
|
71432
|
71434
|
71435
|
71436
|
71437
|
71438
|
71440
|
71441
|
71442
|
71443
|
71444
|
71445
|
71446
|
71447
|
71448
|
71449
|
71450
| 71451 |
71452
|
71453
|
71454
|
71455
|
71456
|
71457
|
71458
|
71459
|
71460
|
71461
|
71462
|
71463
|
71467
|
71564