A few small things: 1 - We calculate the datedue twice 2 - We check for an existing issue, but if we didn't do a renewal then we returned the book, there shouldn't be any issues 3 - We call ModDateLastSeen which simply set the datelast seen and marks item not lost, but we are already setting ti not lost when issuing
Created attachment 111008 [details] [review] Bug 26583: Remove unneccessary code in AddIssue The lines to calc due date are doubled ModDateLastSeen is not needed as we set the item not lost and we can set the date as we do for date last borrowed and save a DB store We should not have an existing issue, either we did and the borrower was the same so we renewed, or we did and the borrower didn't match, so we returned it Largely this is reading the code and confirming the changes make sense To test: 1 - Apply patch 2 - Check out items, confirm it works as before 3 - prove -v t/db_dependent/Circulation.t
Ah, switch on site checkout, will remove the removal for #2
Created attachment 111030 [details] [review] Bug 26583: Remove unneccessary code in AddIssue The lines to calc due date are doubled ModDateLastSeen is not needed as we set the item not lost and we can set the date as we do for date last borrowed and save a DB store Largely this is reading the code and confirming the changes make sense To test: 1 - Apply patch 2 - Check out items, confirm it works as before 3 - prove -v t/db_dependent/Circulation.t
Created attachment 112484 [details] [review] Bug 26583: Remove unneccessary code in AddIssue The lines to calc due date are doubled ModDateLastSeen is not needed as we set the item not lost and we can set the date as we do for date last borrowed and save a DB store Largely this is reading the code and confirming the changes make sense To test: 1 - Apply patch 2 - Check out items, confirm it works as before 3 - prove -v t/db_dependent/Circulation.t Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 112793 [details] [review] Bug 26583: Remove unneccessary code in AddIssue The lines to calc due date are doubled ModDateLastSeen is not needed as we set the item not lost and we can set the date as we do for date last borrowed and save a DB store Largely this is reading the code and confirming the changes make sense To test: 1 - Apply patch 2 - Check out items, confirm it works as before 3 - prove -v t/db_dependent/Circulation.t Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.06
enhancement, not backported to 19.11.x