https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29062
Marcel de Rooy <m.de.r...@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125154|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.r...@rijksmuseum.nl> --- Created attachment 125806 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125806&action=edit Bug 29062: Use primary key issued_id to fetch old_issues for letters The code currently uses itemnumber to fetch old_issues for notices. This doesn't seem to be used in any current notices except the CHECKINSLIP: SELECTY letter.code,content FROM letter WHERE content LIKE 'old\\_%'\G For issues we use itemnumber, however, issues has a constraint to limit issues for an itemnumber to 1 Old issues has no such constraint, we try to rectify this in the old code by adding 'ORDER BY returndate DESC LIMIT 1" As the code is not used by default and buggy I think we can make a change to using 'issue_id' as the key and announcing the change - it prevents leaky data To test: 1. Check something out to patron A. Check it in. 2. Check something out to patron B. Check it in. 3. Check something out to patron C. Check it in and print the check-in slip. (Leave the checkin paghe open) 4. You will see the checkin repeat itself 3 times, one for each line in old_issues. 5. Apply patch and restart_all 6. Click the 'Print checkin slip' button again 7. You see a single checkin 8. Checkout a different item to patron A. Check it in and print the check-in slip 9. See the correct checkins Signed-off-by: Lucas Gass <lu...@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.r...@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/