Bugzilla – Attachment 155471 Details for
Bug 34016
Enable fulfillment of recalled items through SIP2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34016: (QA follow-up) perltidy fixes
Bug-34016-QA-follow-up-perltidy-fixes.patch (text/plain), 5.16 KB, created by
Aleisha Amohia
on 2023-09-10 22:12:59 UTC
(
hide
)
Description:
Bug 34016: (QA follow-up) perltidy fixes
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-09-10 22:12:59 UTC
Size:
5.16 KB
patch
obsolete
>From edcd8a4d2422750cab970f2a1f7f13a789fec70f Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Sun, 10 Sep 2023 22:11:32 +0000 >Subject: [PATCH] Bug 34016: (QA follow-up) perltidy fixes > >--- > C4/SIP/ILS/Transaction/Checkout.pm | 5 +-- > t/db_dependent/SIP/Transaction.t | 53 ++++++++++++++++-------------- > 2 files changed, 32 insertions(+), 26 deletions(-) > >diff --git a/C4/SIP/ILS/Transaction/Checkout.pm b/C4/SIP/ILS/Transaction/Checkout.pm >index d8bd50481e1..4e7e3753b9d 100644 >--- a/C4/SIP/ILS/Transaction/Checkout.pm >+++ b/C4/SIP/ILS/Transaction/Checkout.pm >@@ -146,12 +146,13 @@ sub do_checkout { > } else { > # can issue > my $recall_id; >- foreach (keys %{$messages}) { >+ foreach ( keys %{$messages} ) { > if ( $_ eq "RECALLED" ) { > $recall_id = $messages->{RECALLED}; > } > } >- my $issue = AddIssue( $patron->unblessed, $barcode, $overridden_duedate, 0, undef, undef, { recall_id => $recall_id } ); >+ my $issue = >+ AddIssue( $patron->unblessed, $barcode, $overridden_duedate, 0, undef, undef, { recall_id => $recall_id } ); > $self->{due} = $self->duedatefromissue($issue, $itemnumber); > } > >diff --git a/t/db_dependent/SIP/Transaction.t b/t/db_dependent/SIP/Transaction.t >index 715f3663947..7703330314d 100755 >--- a/t/db_dependent/SIP/Transaction.t >+++ b/t/db_dependent/SIP/Transaction.t >@@ -1049,7 +1049,7 @@ subtest do_checkout_with_recalls => sub { > plan tests => 7; > > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); >- my $patron = $builder->build_object( >+ my $patron = $builder->build_object( > { > class => 'Koha::Patrons', > value => { >@@ -1066,8 +1066,7 @@ subtest do_checkout_with_recalls => sub { > } > ); > >- t::lib::Mocks::mock_userenv( >- { branchcode => $library->branchcode, flags => 1 } ); >+ t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode, flags => 1 } ); > > my $item = $builder->build_sample_item( > { >@@ -1075,14 +1074,16 @@ subtest do_checkout_with_recalls => sub { > } > ); > >- t::lib::Mocks::mock_preference('UseRecalls',1); >- Koha::CirculationRules->set_rule({ >- branchcode => undef, >- categorycode => undef, >- itemtype => undef, >- rule_name => 'recalls_allowed', >- rule_value => '10', >- }); >+ t::lib::Mocks::mock_preference( 'UseRecalls', 1 ); >+ Koha::CirculationRules->set_rule( >+ { >+ branchcode => undef, >+ categorycode => undef, >+ itemtype => undef, >+ rule_name => 'recalls_allowed', >+ rule_value => '10', >+ } >+ ); > > my $recall1 = Koha::Recall->new( > { >@@ -1096,29 +1097,33 @@ subtest do_checkout_with_recalls => sub { > } > )->store; > >- my $sip_patron = C4::SIP::ILS::Patron->new( $patron->cardnumber ); >- my $sip_item = C4::SIP::ILS::Item->new( $item->barcode ); >+ my $sip_patron = C4::SIP::ILS::Patron->new( $patron->cardnumber ); >+ my $sip_item = C4::SIP::ILS::Item->new( $item->barcode ); > my $co_transaction = C4::SIP::ILS::Transaction::Checkout->new(); >- is( $co_transaction->patron($sip_patron), >- $sip_patron, "Patron assigned to transaction" ); >- is( $co_transaction->item($sip_item), >- $sip_item, "Item assigned to transaction" ); >+ is( >+ $co_transaction->patron($sip_patron), >+ $sip_patron, "Patron assigned to transaction" >+ ); >+ is( >+ $co_transaction->item($sip_item), >+ $sip_item, "Item assigned to transaction" >+ ); > > # Test recalls made by another patron > >- $recall1->set_waiting({ item => $item }); >+ $recall1->set_waiting( { item => $item } ); > $co_transaction->do_checkout(); >- is( $patron->checkouts->count, 0, 'Checkout was not done due to waiting recall'); >+ is( $patron->checkouts->count, 0, 'Checkout was not done due to waiting recall' ); > > $recall1->revert_waiting; >- $recall1->start_transfer({ item => $item }); >+ $recall1->start_transfer( { item => $item } ); > $co_transaction->do_checkout(); >- is( $patron->checkouts->count, 0, 'Checkout was not done due to recall in transit'); >+ is( $patron->checkouts->count, 0, 'Checkout was not done due to recall in transit' ); > > $recall1->revert_transfer; >- $recall1->update({ item_id => undef, item_level => 0 }); >+ $recall1->update( { item_id => undef, item_level => 0 } ); > $co_transaction->do_checkout(); >- is( $patron->checkouts->count, 0, 'Checkout was not done due to a biblio-level recall that this item could fill'); >+ is( $patron->checkouts->count, 0, 'Checkout was not done due to a biblio-level recall that this item could fill' ); > > $recall1->set_cancelled; > >@@ -1136,7 +1141,7 @@ subtest do_checkout_with_recalls => sub { > > # Test recalls made by SIP patron > >- $recall2->set_waiting({ item => $item }); >+ $recall2->set_waiting( { item => $item } ); > $co_transaction->do_checkout(); > is( $patron->checkouts->count, 1, 'Checkout was done because recalled item was allocated to them' ); > $recall2 = Koha::Recalls->find( $recall2->id ); >-- >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 34016
:
152371
|
152372
|
152396
|
152397
|
152458
|
152461
|
152462
|
155382
|
155383
|
155471
|
156154
|
156155