To recreate: 1 - Check out an item to a patron 2 - Make sure a fee will be charged when lost 3 - Mark the item lost 4 - Make sure the fee will not be refunded on return of the item 5 - Return the item 6 - Check it out to a new patron 7 - Write off the fine for the original patron 8 - The item is now checked in MarkIssueReturned (under the alias ReturnLostItem) is called from Koha::Account - it takes a borrowernumber and itemnumber, however, only the itemnumber is used for looking up the issue - we don't check against the borrower
Bumping up the severity on this bug as it's pretty messy and I just ran into it with another library.
We're one of the libraries affected by this. We have discovered that it will check the item in even if the item is currently checked out to another patron. That's not good!
Created attachment 97342 [details] [review] Bug 23443: Add tests
Created attachment 97343 [details] [review] Bug 23443: Do not checkin an item if checked out to another patron when lost fee is paid Test plan: 0 - Do not apply this patch 1 - Check out an item to a patron 2 - Make sure a fee will be charged when lost 3 - Mark the item lost 4 - Make sure the fee will not be refunded on return of the item 5 - Return the item 6 - Check it out to a new patron 7 - Write off the fine for the original patron => The item is now checked in 8 - Apply this patch and repeat 1 to 7 => The item is still checked out
Created attachment 97362 [details] [review] Bug 23443: Add tests Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 97363 [details] [review] Bug 23443: Do not checkin an item if checked out to another patron when lost fee is paid Test plan: 0 - Do not apply this patch 1 - Check out an item to a patron 2 - Make sure a fee will be charged when lost 3 - Mark the item lost 4 - Make sure the fee will not be refunded on return of the item 5 - Return the item 6 - Check it out to a new patron 7 - Write off the fine for the original patron => The item is now checked in 8 - Apply this patch and repeat 1 to 7 => The item is still checked out Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Works great, thanks! Also tested with paying the fee rather than writing it off.
QAing
Created attachment 97859 [details] [review] Bug 23443: Add tests Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 97860 [details] [review] Bug 23443: Do not checkin an item if checked out to another patron when lost fee is paid Test plan: 0 - Do not apply this patch 1 - Check out an item to a patron 2 - Make sure a fee will be charged when lost 3 - Mark the item lost 4 - Make sure the fee will not be refunded on return of the item 5 - Return the item 6 - Check it out to a new patron 7 - Write off the fine for the original patron => The item is now checked in 8 - Apply this patch and repeat 1 to 7 => The item is still checked out Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work everyone! Pushed to master for 20.05
Pushed to 19.11.x branch for 19.11.03
backported to 19.05.x for 19.05.08