When a transfer is created by stock rotation, the transfer is left with a NULL datesent - this is so the item won't be in transit until checked in. When checked in, however, the buttons do not have the 'dotransfer' name attribute, and so the transfer is not affected. This means the item tells you to print a slip, but does not get marked as sent. To reecreate: (Ideally you would do this via stock rotation, but we can recreate easily via DB) 1 - INSERT INTO branchtransfers (itemnumber,daterequested,frombranch,tobranch,reason) VALUES (676,NOW(),'CPL','MPL','StockrotationRepatriation'); 2 - Check item in 3 - Print slip or hit OK 4 - Check the item, not in transit 5 - Check the DB, datesent is still null
Created attachment 126267 [details] [review] Bug 29234: Transit on checking
Created attachment 126269 [details] [review] Bug 29234: Transit on checking
Created attachment 126300 [details] [review] Bug 29234: Transit on checking Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed off on the BWS sandbox. Worked as expected.
Created attachment 126481 [details] [review] Bug 29234: Transit on checking Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Needs unit tests
Created attachment 148751 [details] [review] Bug 29234: Unit test This patch adds a test that a pending stock rotation transfer is initiated on checkin, as well as updating the defaults for creating transfer objects To test: prove -v t/db_dependent/Circulation.t
Created attachment 148752 [details] [review] Bug 29234: Transit on checking Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 23.05. Nice work everyone, thanks!
Created attachment 149046 [details] [review] Bug 29234: (QA follow-up) Fix test that expects wrong defaults This patch changes the get_items_that_can_fill tests so they explicitly set a 'datearrived' as the new defaults for fresh transfer objects from TestBuilder is more sane and has this field undef. Tests *should always* create their required scenarios explicitly. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 149093 [details] [review] Bug 29234: Set datesent for transfers in Z3950 Responder tests
Created attachment 149094 [details] [review] Bug 29234: Further clean Z3950 Tests We are deleting all authorised values in Session2.t and assuming they don't exist in Sesson.t This patch ensures the tests will work regardless of data in DB
Created attachment 149095 [details] [review] Bug 29234: Set datesent for transfers in Z3950 Responder tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 149096 [details] [review] Bug 29234: Further clean Z3950 Tests We are deleting all authorised values in Session2.t and assuming they don't exist in Sesson.t This patch ensures the tests will work regardless of data in DB Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Thanks for those follow-ups, Nick!
Nice work everyone! Pushed to stable for 22.11.x
Doesn't apply cleanly to 22.05.x, no backport. If needed please rebase.