Bug 24299

Summary: Record if a transfer was triggered by 'rotating collections'
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: CirculationAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, gmcharlt, klas.blomberg, kyle.m.hall, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Bug Depends on: 24298, 24901    
Bug Blocks: 24436    
Attachments: Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Bug 24299: Add Unit test for 'reason' in transferbook
Bug 24299: Add Unit test for 'reason' in transferbook
Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Bug 24299: Add Unit test for 'reason' in transferbook
Bug 24299: Add Unit test for 'reason' in transferbook

Description Martin Renvoize 2019-12-23 09:49:27 UTC
Use the new 'trigger' field in branchtransfers to record if a transfer was added by the 'rotating collection' tool.
Comment 1 Martin Renvoize 2020-01-16 16:44:05 UTC
Created attachment 97464 [details] [review]
Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Comment 2 Martin Renvoize 2020-01-16 16:44:08 UTC
Created attachment 97465 [details] [review]
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Comment 3 Martin Renvoize 2020-01-17 11:50:20 UTC
Created attachment 97508 [details] [review]
Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Comment 4 Martin Renvoize 2020-01-17 11:50:23 UTC
Created attachment 97509 [details] [review]
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Comment 5 Martin Renvoize 2020-01-17 16:01:46 UTC
Created attachment 97537 [details] [review]
Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Comment 6 Martin Renvoize 2020-01-17 16:01:48 UTC
Created attachment 97538 [details] [review]
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Comment 7 Martin Renvoize 2020-02-03 13:23:33 UTC
Created attachment 98295 [details] [review]
Bug 24299: Add 'RotatingCollection' branchtransfer trigger
Comment 8 Martin Renvoize 2020-02-03 13:23:36 UTC
Created attachment 98296 [details] [review]
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Comment 9 Nick Clemens 2020-03-12 12:25:30 UTC
Created attachment 100626 [details] [review]
Bug 24299: Add 'RotatingCollection' branchtransfer trigger

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Nick Clemens 2020-03-12 12:25:33 UTC
Created attachment 100627 [details] [review]
Bug 24299: Record 'RotatingCollection' as a transfer trigger

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 11 Nick Clemens 2020-03-12 12:28:10 UTC
Test coverage for transferbook and TransferCollection wouldn't hurt
Comment 12 Martin Renvoize 2020-03-19 08:45:47 UTC
(In reply to Nick Clemens from comment #11)
> Test coverage for transferbook and TransferCollection wouldn't hurt

Added bug 24901 to add basic test coverage for transferbook.. would be great to get a second pair of eyes as I was rather surprised by how the functionality of the method actually worked once I started writing tests :(.. The POD is completely wrong.

I'll add a little followup here to catch the additional field being populated
Comment 13 Martin Renvoize 2020-03-20 11:16:53 UTC
Created attachment 101075 [details] [review]
Bug 24299: Add 'RotatingCollection' branchtransfer trigger

This patch adds the RotatingCollection value to the database enum for
branchtransfer.reason
Comment 14 Martin Renvoize 2020-03-20 11:16:56 UTC
Created attachment 101076 [details] [review]
Bug 24299: Record 'RotatingCollection' as a transfer trigger

This patch adds support for passing a trigger to
C4::Circulation::transferbook and passes 'RotatingCollection' to it when
called inside the rotating collections routine.

Test plan:
1/ Perform a rotating collection transfer operations
2/ Check the database for instances of 'RotatingCollection' in the
branchtransfers.reason field.
3/ Signoff
Comment 15 Martin Renvoize 2020-03-20 11:16:59 UTC
Created attachment 101077 [details] [review]
Bug 24299: Add Unit test for 'reason' in transferbook

Test plan
1/ Run test and verify it passes
2/ Signoff
Comment 16 Martin Renvoize 2020-03-20 11:44:15 UTC
Created attachment 101083 [details] [review]
Bug 24299: Add Unit test for 'reason' in transferbook

Test plan
1/ Run test and verify it passes
2/ Signoff
Comment 17 Martin Renvoize 2020-03-20 12:00:14 UTC
Created attachment 101084 [details] [review]
Bug 24299: Add 'RotatingCollection' branchtransfer trigger

This patch adds the RotatingCollection value to the database enum for
branchtransfer.reason

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 18 Martin Renvoize 2020-03-20 12:00:17 UTC
Created attachment 101085 [details] [review]
Bug 24299: Record 'RotatingCollection' as a transfer trigger

This patch adds support for passing a trigger to
C4::Circulation::transferbook and passes 'RotatingCollection' to it when
called inside the rotating collections routine.

Test plan:
1/ Perform a rotating collection transfer operations
2/ Check the database for instances of 'RotatingCollection' in the
branchtransfers.reason field.
3/ Signoff

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 19 Martin Renvoize 2020-03-20 12:00:20 UTC
Created attachment 101086 [details] [review]
Bug 24299: Add Unit test for 'reason' in transferbook

Test plan
1/ Run test and verify it passes
2/ Signoff
Comment 20 Nick Clemens 2020-03-20 12:58:09 UTC
Created attachment 101097 [details] [review]
Bug 24299: Add Unit test for 'reason' in transferbook

Test plan
1/ Run test and verify it passes
2/ Signoff

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 21 Nick Clemens 2020-03-20 12:59:11 UTC
Small patchset in this chain, works as expected and tested, passing QA.

Don't forget to pull the Schema changes out of first patch and regenerate
Comment 22 Martin Renvoize 2020-03-20 16:04:52 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 23 Joy Nelson 2020-04-03 21:15:08 UTC
enhancement not backported to 19.11.x