When ChildNeedsGuarantor is enabled, Koha will throw an exception and fail to check an item in if the borrowing patron could have a guarantor but does not. The failed checkin gives a generic messages about configuration issues. We should check the item in and report on the screen that the patron should have a guarantor. To recreate: 1 - have a patron in a category that can be a guarantee but does not have a guarantor on their account 2 - set TrackLastPatronActivityTriggers to update the patron on checkin of an item 3 - check an item out to your patron 4 - set ChildNeedsGuarantor to "must have" 5 - check your item in, get error It also throws an exception at checkout if your tell TrackLastPatronActivityTriggers to update at checkout, but the checkout succeeds. We've seen inconsistent behavior between production and test sites around the specifics of this error that we haven't quite nailed down yet. It's possible something changed here between 24.05.06 and main as they generate this error slightly differently.
Created attachment 181941 [details] [review] Bug 39180: Catch exception when updating patron lastseen date This patch adds a catch during checkin and passes a message back to the caller For checkouts and renewals we don't have a method for passing messages so we simply catch the exception and warn - this seems reasonable, I think we should add a warning on the patron display that a required guarantor is missing, but not break circulation. We will need to add unit tests
(In reply to Nick Clemens (kidclamp) from comment #1) > Created attachment 181941 [details] [review] [review] > Bug 39180: Catch exception when updating patron lastseen date > > This patch adds a catch during checkin and passes a message back to the > caller > > For checkouts and renewals we don't have a method for passing messages so we > simply catch the exception > and warn - this seems reasonable, I think we should add a warning on the > patron display that a required guarantor > is missing, but not break circulation. > > We will need to add unit tests The general approach here is good, but the popup at checkin should tell the user more specifically what has happened. Something like "This item has been checked-in, but the following warning still needs to be addressed: [Child patron needs a guarantor]." If we put some obvious alert in the patron record, we don't need to give a special message at checkout and renewal.
Are you coming back to this one Nick.. it's still marked as NEW.. I like the direction of travel but it sounds like there's a little more to go before NSO?