Bug 26618 - C4/RotatingCollections.pm should not use C4::Circulation::transferbook
Summary: C4/RotatingCollections.pm should not use C4::Circulation::transferbook
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL: https://gitlab.com/mrenvoize/Koha/-/t...
Keywords:
Depends on: 24446
Blocks: 22569
  Show dependency treegraph
 
Reported: 2020-10-06 10:58 UTC by Martin Renvoize
Modified: 2021-01-12 11:30 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 26618: Remove use of transferbook in RotatingCollections (6.91 KB, patch)
2020-10-06 13:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26618: Remove use of transferbook in RotatingCollections (7.68 KB, patch)
2020-10-06 15:56 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2020-10-06 10:58:10 UTC
We are going to deprecate transferbook and should therefore convert the logic of RotatingCollections to utilise the new methods available to us in Koha::Item and friends.
Comment 1 Martin Renvoize 2020-10-06 13:20:36 UTC
Created attachment 111305 [details] [review]
Bug 26618: Remove use of transferbook in RotatingCollections

This patch replaces the use of C4::Circulation::transferbook in
C4::RotatingCollections with calls to Koha::Item->request_transfer and
adds handling for the various failure cases which that can throw.
Comment 2 Martin Renvoize 2020-10-06 15:56:34 UTC
Created attachment 111313 [details] [review]
Bug 26618: Remove use of transferbook in RotatingCollections

This patch replaces the use of C4::Circulation::transferbook in
C4::RotatingCollections with calls to Koha::Item->request_transfer and
adds handling for the various failure cases which that can throw.

We also introduce additional feedback for the end user where it did not
exist before. Now we notify the user if some of the collection could not
be transfers or if transfers were queued rather than set to request
immediately.

Test plan
1/ Set up a rotating collection
2/ Transfer the collection
3/ Confirm the action succeeds
4/ Set up some branch transfer limits that will affect items in your
collection
5/ Transfer the collection
6/ Note that the transfer succeeds but some items are returned as
failures
Comment 3 Martin Renvoize 2020-10-20 13:27:34 UTC
Please test this as part of the bug 22569 tree linked above.