]> git.koha-community.org Git - koha.git/commit
Bug 37524: Do not attempt to renew check outs if there is nothing to renew
authorEmmi Takkinen <emmi.takkinen@koha-suomi.fi>
Tue, 30 Jul 2024 12:43:08 +0000 (15:43 +0300)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 16 Sep 2024 08:40:56 +0000 (10:40 +0200)
commit45e7bdaff7d481d10a99d9e84b3851b8be90d355
treefc5bd80038af881de9a05a679218dfe8a000bd66
parent6bcc82815d727ee0d6faa94aa42a86909e5d9a57
Bug 37524: Do not attempt to renew check outs if there is nothing to renew

If patrons loans are not renewable and one hits "Renew all"
button in patrons "Check out" page, Koha is redirected to
"Export data" tool. This happens because when there is
nothing to renew call to function renew_all produces error:
"Uncaught TypeError: renew_all(...) is undefined". This
patch prevents call to this function and adds alert to
inform user that there are no items to be renewed.

To reproduce:
1. Find patron with check outs which renewals count has hit
the maximum limit of renewals.
2. Press "Renew all" button.
=> Koha is redirected to "Export data" tool.
3. Apply this patch.
4. Try to renew check outs again.
=> Alert pop up is displayed.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/js/checkouts.js