Koha/members
Nick Clemens 814789f8cb 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 <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-07 15:49:01 +02:00
..
accountline-details.pl Bug 22435: Update accountline-details page to show all history 2021-08-04 14:06:43 +02:00
apikeys.pl Bug 28772: Display API secret once 2021-09-30 09:19:05 +02:00
boraccount.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
cancel-charge.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
default_messageprefs.pl
deletemem.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
discharge.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
discharges.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
files.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
guarantor_search.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
holdshistory.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
housebound.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ill-requests.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
mancredit.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
maninvoice.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
member-flags.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
member-password.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
member.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
memberentry.pl Bug 26352: Switch from using call() to call_recursive() 2021-10-06 14:56:09 +02:00
members-home.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
members-update-do.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
members-update.pl Bug 28073: Patron modifications should auto-open panel for referring patron record 2021-07-26 12:46:32 +02:00
merge-patrons.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
mod_debarment.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
moremember.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
notices.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
patronimage.pl Bug 28606: Remove $DEBUG and $ENV{DEBUG} 2021-06-24 11:53:44 +02:00
pay.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
paycollect.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
print_overdues.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
printfeercpt.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
printinvoice.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
printslip.pl Bug 29062: Use primary key issued_id to fetch old_issues for letters 2021-10-07 15:49:01 +02:00
purchase-suggestions.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
readingrec.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
routing-lists.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
setstatus.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
statistics.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
summary-print.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
update-child.pl Bug 28624: Remove Smart::Comments 2021-07-26 12:46:32 +02:00