@@ -, +, @@ --- t/db_dependent/Circulation.t | 22 +++++++++++----------- t/db_dependent/Circulation/issue.t | 10 ++++++---- t/db_dependent/CourseReserves.t | 3 +-- t/db_dependent/Holds/LocalHoldsPriority.t | 5 +++-- t/db_dependent/Holds/RevertWaitingStatus.t | 3 +-- t/db_dependent/Koha/Items.t | 8 ++++---- t/db_dependent/Labels/t_Label.t | 2 +- t/db_dependent/Reserves.t | 3 +-- t/db_dependent/api/v1/items.t | 2 +- 9 files changed, 29 insertions(+), 29 deletions(-) --- a/t/db_dependent/Circulation.t +++ a/t/db_dependent/Circulation.t @@ -143,11 +143,11 @@ my $itemtype = $builder->build( { source => 'Itemtype', value => { - notforloan => undef, - rentalcharge => 0, + notforloan => 0, + rentalcharge => 0, rentalcharge_daily => 0, - defaultreplacecost => undef, - processfee => undef + defaultreplacecost => undef, + processfee => undef } } )->{itemtype}; @@ -4650,7 +4650,7 @@ subtest 'CanBookBeIssued | notforloan' => sub { my $itemtype = $builder->build( { source => 'Itemtype', - value => { notforloan => undef, } + value => { notforloan => 0, } } ); my $item = $builder->build_sample_item( @@ -4684,7 +4684,7 @@ subtest 'CanBookBeIssued | notforloan' => sub { ); # not for loan at item level - Koha::ItemTypes->find( $itemtype->{itemtype} )->notforloan(undef)->store; + Koha::ItemTypes->find( $itemtype->{itemtype} )->notforloan(0)->store; $item->notforloan( 1 )->store; ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, undef, undef, undef, undef ); is_deeply( $needsconfirmation, {}, 'No confirmation needed, AllowNotForLoanOverride=0' ); @@ -4704,7 +4704,7 @@ subtest 'CanBookBeIssued | notforloan' => sub { my $itemtype = $builder->build( { source => 'Itemtype', - value => { notforloan => undef, } + value => { notforloan => 0, } } ); @@ -4726,7 +4726,7 @@ subtest 'CanBookBeIssued | notforloan' => sub { ); # not for loan at item level - Koha::ItemTypes->find( $itemtype->{itemtype} )->notforloan(undef)->store; + Koha::ItemTypes->find( $itemtype->{itemtype} )->notforloan(0)->store; $item->notforloan( 1 )->store; ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->barcode, undef, undef, undef, undef ); is_deeply( $needsconfirmation, {}, 'No confirmation needed, AllowNotForLoanOverride=0' ); @@ -5191,7 +5191,7 @@ subtest 'Incremented fee tests' => sub { { class => 'Koha::ItemTypes', value => { - notforloan => undef, + notforloan => 0, rentalcharge => 0, rentalcharge_daily => 1, rentalcharge_daily_calendar => 0 @@ -5456,8 +5456,8 @@ subtest 'CanBookBeIssued & RentalFeesCheckoutConfirmation' => sub { { class => 'Koha::ItemTypes', value => { - notforloan => 0, - rentalcharge => 0, + notforloan => 0, + rentalcharge => 0, rentalcharge_daily => 0 } } --- a/t/db_dependent/Circulation/issue.t +++ a/t/db_dependent/Circulation/issue.t @@ -73,13 +73,15 @@ $dbh->do(q|DELETE FROM statistics|); # Generate sample datas my $itemtype = $builder->build( - { source => 'Itemtype', - value => { notforloan => undef, rentalcharge => 0 } + { + source => 'Itemtype', + value => { notforloan => 0, rentalcharge => 0 } } )->{itemtype}; my $itemtype2 = $builder->build( - { source => 'Itemtype', - value => { notforloan => undef } + { + source => 'Itemtype', + value => { notforloan => 0 } } )->{itemtype}; my $branchcode_1 = $builder->build({ source => 'Branch' })->{branchcode}; --- a/t/db_dependent/CourseReserves.t +++ a/t/db_dependent/CourseReserves.t @@ -35,8 +35,7 @@ $schema->storage->txn_begin; my $builder = t::lib::TestBuilder->new; my $branchcode = $builder->build( { source => 'Branch' } )->{branchcode}; -my $itemtype = $builder->build( - { source => 'Itemtype', value => { notforloan => undef } } )->{itemtype}; +my $itemtype = $builder->build( { source => 'Itemtype', value => { notforloan => 0 } } )->{itemtype}; # Create 10 sample borrowers my @borrowers = (); --- a/t/db_dependent/Holds/LocalHoldsPriority.t +++ a/t/db_dependent/Holds/LocalHoldsPriority.t @@ -32,8 +32,9 @@ my $library2 = $builder->build({ source => 'Branch', }); my $library3 = $builder->build({ source => 'Branch', }); my $library4 = $builder->build({ source => 'Branch', }); my $itemtype = $builder->build( - { source => 'Itemtype', - value => { notforloan => undef, rentalcharge => 0 } + { + source => 'Itemtype', + value => { notforloan => 0, rentalcharge => 0 } } )->{itemtype}; --- a/t/db_dependent/Holds/RevertWaitingStatus.t +++ a/t/db_dependent/Holds/RevertWaitingStatus.t @@ -38,8 +38,7 @@ $dbh->do("DELETE FROM reserves"); $dbh->do("DELETE FROM old_reserves"); my $branchcode = $builder->build( { source => 'Branch' } )->{branchcode}; -my $itemtype = $builder->build( - { source => 'Itemtype', value => { notforloan => undef } } )->{itemtype}; +my $itemtype = $builder->build( { source => 'Itemtype', value => { notforloan => 0 } } )->{itemtype}; t::lib::Mocks::mock_userenv({ flags => 1, userid => '1', branchcode => $branchcode }); --- a/t/db_dependent/Koha/Items.t +++ a/t/db_dependent/Koha/Items.t @@ -268,7 +268,7 @@ subtest 'store' => sub { { class => 'Koha::ItemTypes', value => { - notforloan => undef, + notforloan => 0, rentalcharge => 0, defaultreplacecost => undef, processfee => $processfee_amount, @@ -791,7 +791,7 @@ subtest 'store' => sub { { class => 'Koha::ItemTypes', value => { - notforloan => undef, + notforloan => 0, rentalcharge => 0, defaultreplacecost => undef, processfee => 0, @@ -915,7 +915,7 @@ subtest 'store' => sub { { class => 'Koha::ItemTypes', value => { - notforloan => undef, + notforloan => 0, rentalcharge => 0, defaultreplacecost => undef, processfee => 0, @@ -1290,7 +1290,7 @@ subtest 'store' => sub { { class => 'Koha::ItemTypes', value => { - notforloan => undef, + notforloan => 0, rentalcharge => 0, defaultreplacecost => undef, processfee => 0, --- a/t/db_dependent/Labels/t_Label.t +++ a/t/db_dependent/Labels/t_Label.t @@ -54,7 +54,7 @@ my $branch_1 = $builder->build( { source => 'Branch' } )->{branchcode}; my $category_1 = $builder->build( { source => 'Category' } )->{categorycode}; # Add an item type -my $itemtype = $builder->build( { source => 'Itemtype', value => { notforloan => undef } } )->{itemtype}; +my $itemtype = $builder->build( { source => 'Itemtype', value => { notforloan => 0 } } )->{itemtype}; t::lib::Mocks::mock_userenv( { branchcode => $branch_1 } ); --- a/t/db_dependent/Reserves.t +++ a/t/db_dependent/Reserves.t @@ -79,8 +79,7 @@ my $branch_3 = $builder->build({ source => 'Branch' })->{ branchcode }; my $category_1 = $builder->build({ source => 'Category' })->{ categorycode }; my $category_2 = $builder->build({ source => 'Category' })->{ categorycode }; # Add an item type -my $itemtype = $builder->build( - { source => 'Itemtype', value => { notforloan => undef } } )->{itemtype}; +my $itemtype = $builder->build( { source => 'Itemtype', value => { notforloan => 0 } } )->{itemtype}; t::lib::Mocks::mock_userenv({ branchcode => $branch_1 }); --- a/t/db_dependent/api/v1/items.t +++ a/t/db_dependent/api/v1/items.t @@ -333,7 +333,7 @@ subtest 'get() tests' => sub { ->json_is( '/not_for_loan_status' => 0, 'not_for_loan_status is 0' ) ->json_is( '/effective_not_for_loan_status' => 2, 'effective_not_for_loan_status now picks up itemtype level - item-level_itypes:1' ); - $itype->notforloan(undef)->store(); + $itype->notforloan(0)->store(); $t->get_ok( "//$userid:$password@/api/v1/items/" . $item->itemnumber )->status_is( 200, 'SWAGGER3.2.2' ) ->json_is( '/not_for_loan_status' => 0, 'not_for_loan_status is 0' )->json_is( '/effective_not_for_loan_status' => 0, --