When I check in something using the KOCT the last seen date is not updated. It does update the last seen date upon checkout, for what it's worth.
It's clear for me that the problem exists on Koha side. It seems that ProcessOfflineReturn use MarkIssueReturned and not AddReturn (which do the ModDateLastSeen). I wonder why there is 2 subs handling checkin and not one...
Created attachment 96201 [details] [review] Bug 15751: Add ModDateLastSeen to ProcessOfflineReturn Test plan: 1) Before the patch when one checks in something using the KOCT the last seen date is not updated. 2) After the patch when one checks in something using the KOCT the last seen date is updated.
The reason for two subs is that a KOCT transaction cannot deal with the error cases that AddReturn can throw.. as such we perform the actual return regardless of any normal error cases.
Created attachment 96203 [details] [review] Bug 15751: Add ModDateLastSeen to ProcessOfflineReturn Test plan: 1) Before the patch when one checks in something using the KOCT the last seen date is not updated. 2) After the patch when one checks in something using the KOCT the last seen date is updated.
I am wondering if the fix is not to use AddReturn instead of MarkIssueReturned. See also bug 21494 and https://lists.koha-community.org/pipermail/koha-devel/2019-December/045432.html
Looking at signing off this. Tempted to set it to "in discussion" because of comment 5, but I think Martin sort of answered it in comment 3? Then I see there are no tests for ProcessOfflineReturn, and not for ProcessOfflineIssue or ProcessOfflinePayment either. But asking for that might be a bit too much on this bug?
Patch tested with a sandbox, by Laurence Rault <laurence.rault@biblibre.com>
Created attachment 102692 [details] [review] Bug 15751: Add ModDateLastSeen to ProcessOfflineReturn Test plan: 1) Before the patch when one checks in something using the KOCT the last seen date is not updated. 2) After the patch when one checks in something using the KOCT the last seen date is updated. Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Created attachment 104074 [details] [review] Bug 15751: Add ModDateLastSeen to ProcessOfflineReturn Test plan: 1) Before the patch when one checks in something using the KOCT the last seen date is not updated. 2) After the patch when one checks in something using the KOCT the last seen date is updated. Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Magnus Enger from comment #6) > Looking at signing off this. > > Tempted to set it to "in discussion" because of comment 5, but I think > Martin sort of answered it in comment 3? > > Then I see there are no tests for ProcessOfflineReturn, and not for > ProcessOfflineIssue or ProcessOfflinePayment either. But asking for that > might be a bit too much on this bug? Adding tests would certainly be preferable.. I'm going to keep this one in my queue and attempt to write tests as part of push.
Nice work everyone! Pushed to master for 20.05
backported to 19.11.x for 19.11.06
backported to 19.05.x for 19.05.11