Bugzilla – Attachment 119986 Details for
Bug 27281
Replace call to `C4::Circulation::DeleteTransfer` with `Koha::Item::Transfer->cancel({ comment => $comment })` in `C4::Circulation::LostItem`
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27281: (QA follow-up) Restore test for holdingbranch
Bug-27281-QA-follow-up-Restore-test-for-holdingbra.patch (text/plain), 3.17 KB, created by
Martin Renvoize (ashimema)
on 2021-04-22 08:36:34 UTC
(
hide
)
Description:
Bug 27281: (QA follow-up) Restore test for holdingbranch
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-22 08:36:34 UTC
Size:
3.17 KB
patch
obsolete
>From 7e4cb6a8f674266fb83f85b4d93f969a2913c006 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 22 Apr 2021 09:35:11 +0100 >Subject: [PATCH] Bug 27281: (QA follow-up) Restore test for holdingbranch > >I inadvertantly removed the test that varified that the items >holdingbranch is unaffected by the call to LostItem. This restores such >a test and adds a few comments to clarify the test transfers. >--- > t/db_dependent/Circulation.t | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 143c5c8a79..f95002efa0 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -3475,16 +3475,18 @@ subtest 'Set waiting flag' => sub { > }; > > subtest 'Cancel transfers on lost items' => sub { >- plan tests => 5; >+ plan tests => 6; > > my $library_to = $builder->build_object( { class => 'Koha::Libraries' } ); > my $item = $builder->build_sample_item(); >+ my $holdingbranch = $item->holdingbranch; >+ # Historic transfer (datearrived is defined) > my $old_transfer = $builder->build_object( > { > class => 'Koha::Item::Transfers', > value => { > itemnumber => $item->itemnumber, >- frombranch => $item->holdingbranch, >+ frombranch => $holdingbranch, > tobranch => $library_to->branchcode, > reason => 'Manual', > datesent => \'NOW()', >@@ -3494,12 +3496,13 @@ subtest 'Cancel transfers on lost items' => sub { > } > } > ); >+ # Queued transfer (datesent is undefined) > my $transfer_1 = $builder->build_object( > { > class => 'Koha::Item::Transfers', > value => { > itemnumber => $item->itemnumber, >- frombranch => $item->holdingbranch, >+ frombranch => $holdingbranch, > tobranch => $library_to->branchcode, > reason => 'Manual', > datesent => undef, >@@ -3509,12 +3512,13 @@ subtest 'Cancel transfers on lost items' => sub { > } > } > ); >+ # In transit transfer (datesent is defined, datearrived and datecancelled are both undefined) > my $transfer_2 = $builder->build_object( > { > class => 'Koha::Item::Transfers', > value => { > itemnumber => $item->itemnumber, >- frombranch => $item->holdingbranch, >+ frombranch => $holdingbranch, > tobranch => $library_to->branchcode, > reason => 'Manual', > datesent => \'NOW()', >@@ -3537,6 +3541,8 @@ subtest 'Cancel transfers on lost items' => sub { > is($transfer_2->cancellation_reason, 'ItemLost', "Cancellation reason was set to 'ItemLost'"); > $old_transfer->discard_changes; > is($old_transfer->datecancelled, undef, "Old transfers are unaffected"); >+ $item->discard_changes; >+ is($item->holdingbranch, $holdingbranch, "Items holding branch remains unchanged"); > }; > > subtest 'CanBookBeIssued | is_overdue' => sub { >-- >2.20.1
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 27281
:
117921
|
117922
|
117924
|
117925
|
117926
|
119754
|
119755
|
119756
|
119757
|
119847
|
119848
|
119849
|
119850
| 119986 |
120105
|
120107
|
120117