We have just one call to DeleteTransfer left.. we should replace it with Koha::Item::Transfer->cancel and then drop DeleteTransfer entirely :)
Created attachment 117927 [details] [review] Bug 27896: Remove DeleteTransfer from circ/return.pl This patch replaces the DeleteTransfer call in circ/returns.pl with a call to Koha::Item::Transfer->cancel. Test plan 1/ Check an item out 2/ Add a transfer request for the item to a second library 3/ Attempt to check the item in at the first library 4/ Note that you should be given a 'WrongTransfer' modal and have to option to cancel. 5/ Cancel the transfer 6/ Check in the database that the transfer now has 'datecancelled' set. 7/ Add a transfer for the item again 8/ From the transferstoreceive page cancel the transfer 9/ Click cancel and again check that datecancelled is set in the database for your transfer
Created attachment 117928 [details] [review] BUg 27896: Remove DeleteTransfer This patch removes the last mentions of DeleteTransfer Test plan 1/ Grep the codebase for DeleteTransfer 2/ It should no longer exist
Throws software error at step 9: "click cancel" when I click the cancel button: > Can't use string ("Koha::Item") as a HASH ref while "strict refs" in use at /Koha/Object.pm line 782. Seems like the source of the problem is located in returns.pl at the line 231: > my $item = Koha::Item->find($itemnumber); I managed to fix it by changing "Koha::Item" to "Koha::Items" and it seems to work fine after that change, but please check if it's a correct solution anyway :)
Created attachment 119345 [details] [review] Bug 27896: (follow-up) Fix Typo
Thanks Peter, you are indeed correct. I've added a followup with the suggested typo fix.
Created attachment 119347 [details] [review] Bug 27896: Remove DeleteTransfer from circ/return.pl This patch replaces the DeleteTransfer call in circ/returns.pl with a call to Koha::Item::Transfer->cancel. Test plan 1/ Check an item out 2/ Add a transfer request for the item to a second library 3/ Attempt to check the item in at the first library 4/ Note that you should be given a 'WrongTransfer' modal and have to option to cancel. 5/ Cancel the transfer 6/ Check in the database that the transfer now has 'datecancelled' set. 7/ Add a transfer for the item again 8/ From the transferstoreceive page cancel the transfer 9/ Click cancel and again check that datecancelled is set in the database for your transfer Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 119348 [details] [review] BUg 27896: Remove DeleteTransfer This patch removes the last mentions of DeleteTransfer Test plan 1/ Grep the codebase for DeleteTransfer 2/ It should no longer exist Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 119349 [details] [review] Bug 27896: (follow-up) Fix Typo Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Created attachment 119758 [details] [review] Bug 27896: Remove DeleteTransfer from circ/return.pl This patch replaces the DeleteTransfer call in circ/returns.pl with a call to Koha::Item::Transfer->cancel. Test plan 1/ Check an item out 2/ Add a transfer request for the item to a second library 3/ Attempt to check the item in at the first library 4/ Note that you should be given a 'WrongTransfer' modal and have to option to cancel. 5/ Cancel the transfer 6/ Check in the database that the transfer now has 'datecancelled' set. 7/ Add a transfer for the item again 8/ From the transferstoreceive page cancel the transfer 9/ Click cancel and again check that datecancelled is set in the database for your transfer Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 119759 [details] [review] BUg 27896: Remove DeleteTransfer This patch removes the last mentions of DeleteTransfer Test plan 1/ Grep the codebase for DeleteTransfer 2/ It should no longer exist Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 119760 [details] [review] Bug 27896: (follow-up) Fix Typo Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 119761 [details] [review] Bug 27896: (QA follow-up) Fix number of unit tests Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 21.05, thanks to everybody involved!
Enhancement not pushed to 20.11.x