Occasionally, we have reserves placed on our system without a linked borrowernumber. It displays as NULL in the reserves table of the database. I cannot recreate how this behavior is happening so far, except to say it appears to originate on the public side of the system. Some debugging code was added to C4::Reserves::AddReserve on our system, and the logs revealed it's a call to AddReserve where no borrowernumber is passed in -- on the OPAC side. Has anyone else seen this behavior? Know why it's happening? Thanks!
I don't see any instances in the reserves table, but I see many in old_reserves (v3.18.x). I wonder if that is the same problem. What is the effect of having holds with no borrowernumber?
This was reported against a very old and now unmaintained version of Koha - 3.16. I am closing WONTFIX - please reopen if you can still see this happening in a more current version. NULL borrowernumbers in old_reserves can happen when deleting a patron: CONSTRAINT `old_reserves_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, In reserves the line should be deleted: CONSTRAINT `reserves_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,