Koha/members
Nick Clemens 22cc378e4c 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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2021-10-08 11:15:51 -04:00
..
accountline-details.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
apikeys.pl Bug 28772: Display API secret once 2021-09-15 10:47:11 -04:00
boraccount.pl Bug 27971: Update void method to use double entry accounting 2021-04-23 11:58:49 +02:00
cancel-charge.pl Bug 24603: Adjust permissions for cancel-charge.pl 2020-11-10 15:00:14 +01:00
default_messageprefs.pl Bug 18403: Update permissions - borrowers => 1|* becomes borrowers => 'edit_borrowers' 2018-02-12 15:41:37 -03:00
deletemem.pl Bug 27144: Fix syntax error that prevents deleting patrons 2020-12-04 15:26:49 +01:00
discharge.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
discharges.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
files.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
guarantor_search.pl Bug 23271: Replace search_limited with search_with_library_limits 2021-04-21 15:25:07 +02:00
holdshistory.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
housebound.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
ill-requests.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
mancredit.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
maninvoice.pl Bug 26760: Escape URI parameters in redirect URI to paycollect.pl 2021-07-16 08:40:17 -04:00
member-flags.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
member-password.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
member.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
memberentry.pl Bug 28935: (QA follow-up) Use BorrowerUnwantedField on staff client 2021-09-15 10:05:17 -04:00
members-home.pl Bug 23271: Replace search_limited with search_with_library_limits 2021-04-21 15:25:07 +02:00
members-update-do.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
members-update.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
merge-patrons.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
mod_debarment.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
moremember.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
notices.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
patronimage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
pay.pl Bug 28147: Pass itemnumber through to Account->pay 2021-04-16 12:28:17 +02:00
paycollect.pl Bug 24786: Update paycollect to use session register 2020-11-06 15:39:59 +01:00
print_overdues.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
printfeercpt.pl Bug 26734: Convert printfeercpt/printinvoice to use GetPreparedLetter 2021-04-27 16:23:49 +02:00
printinvoice.pl Bug 26734: Convert printfeercpt/printinvoice to use GetPreparedLetter 2021-04-27 16:23:49 +02:00
printslip.pl Bug 29062: Use primary key issued_id to fetch old_issues for letters 2021-10-08 11:15:51 -04:00
purchase-suggestions.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
readingrec.pl Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl 2021-03-05 13:54:13 +01:00
routing-lists.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
setstatus.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
statistics.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
summary-print.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
update-child.pl Bug 23271: Replace search_limited with search_with_library_limits 2021-04-21 15:25:07 +02:00