Bug 29380: Correct table name in joins to prevent errors
authorJoonas Kylmälä <joonas.kylmala@iki.fi>
Sat, 30 Oct 2021 19:02:39 +0000 (19:02 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 3 Nov 2021 14:40:52 +0000 (15:40 +0100)
commit9ead06892044ef76d4a2817ed17bbff136fb6788
treecd576135c685d5fbd242d35b33d45eb7a2da60e8
parent35c279ac59a02fc9656f0917cbda4c597945c203
Bug 29380: Correct table name in joins to prevent errors

The commit "Bug 29290: Rename relationships borrower =>
patron" (d46492ac23) renamed the relation for the borrowers table from
'borrower' to 'patron' but the joins were not updated accordingly so a
few scripts got broken.

To test:
 1) Notice that
    $ perl misc/cronjobs/automatic_renewals.pl -c -s -v
    returns 255 error code on exit
 2) Apply patch
 3) Notice the automatic_renewals.pl works now and exit code is 0
 4) Make sure /cgi-bin/koha/tools/batch_extend_due_dates.pl works.
 5) Try to grep for 'borrower' in Koha source code and see if there
    are any other join done using the Koha::Checkout or
    Koha::Old::Checkout objects.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29380: (follow-up) Fix renewal feature in staff interface

The commit "Bug 29290: Rename relationships borrower =>
patron" (d46492ac23) renamed the relation for the borrowers table from
'borrower' to 'patron' but the usage in the renew.pl script was not
updated.

To test:
 1) Try to renew a book in intranet through the renewal tab
 2) Notice it gives error
 3) Apply patch
 4) Notice the error is now gone

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
circ/checkout-notes.pl
circ/renew.pl
misc/cronjobs/automatic_renewals.pl
tools/batch_extend_due_dates.pl