Hi Jonathan Today you wrote:
Yes it's now 3 but your original question was about having it "(empty)" on the UI. Empty in the DB should never generate a auto_too_late error.
You get a auto_too_late error when: issue date + no_auto_renewal_after lengthunit is < $now So basically if: issue date = 15 days ago no_auto_renewal_after = 3 lengthunit = days now = today Then you get a auto_too_late today :)
To fix your problem I would remove the no_auto_renewal_after rules (or set them to an empty string in DB). Then run the script and you will see your issues auto renewed without this auto_too_late error.
I have now checked in the not-autorenewed book. Then I removed the no_auto_renewal_after rules in the staff client so they look again as before - namely as follows in table "circulation_rules": MariaDB [koha_hfs]> select * from circulation_rules; +-----+------------+--------------+----------+----------------------------------+---------------+ | id | branchcode | categorycode | itemtype | rule_name | rule_value | +-----+------------+--------------+----------+----------------------------------+---------------+ ... | 147 | NULL | S | NULL | no_auto_renewal_after | | | 148 | NULL | ST | NULL | no_auto_renewal_after | | | 149 | NULL | T | NULL | no_auto_renewal_after | | | 150 | HFS | S | NULL | no_auto_renewal_after | | | 151 | HFS | ST | NULL | no_auto_renewal_after | | | 152 | HFS | T | NULL | no_auto_renewal_after | | ... Then I checked the book out again and as expected table "issues" shows the following: MariaDB [koha_hfs]> select issue_id, borrowernumber, itemnumber, date_due, auto_renew, auto_renew_error, renewals from issues where itemnumber=38; +----------+----------------+------------+---------------------+------------+------------------+----------+ | issue_id | borrowernumber | itemnumber | date_due | auto_renew | auto_renew_error | renewals | +----------+----------------+------------+---------------------+------------+------------------+----------+ | 219 | 5 | 38 | 2021-02-17 23:59:00 | 1 | NULL | 0 | +----------+----------------+------------+---------------------+------------+------------------+----------+ Now I'm waiting until script "/etc/cron.daily/koha-common" will run script "automatic_renewals.pl" tomorrow morning. I will observe this again every day until I see the book is successfully renewed and wonder if it will happen and when (because now the settings are the same as in the beginning). Thanks for your help for now! Best wishes: Michael -- Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz T 0041 (0)61 261 55 61 · E mik@adminkuhn.ch · W www.adminkuhn.ch Am 20.01.21 um 11:47 schrieb Jonathan Druart:
Yes it's now 3 but your original question was about having it "(empty)" on the UI. Empty in the DB should never generate a auto_too_late error.
You get a auto_too_late error when: issue date + no_auto_renewal_after lengthunit is < $now So basically if: issue date = 15 days ago no_auto_renewal_after = 3 lengthunit = days now = today Then you get a auto_too_late today :)
To fix your problem I would remove the no_auto_renewal_after rules (or set them to an empty string in DB). Then run the script and you will see your issues auto renewed without this auto_too_late error.
Le mer. 20 janv. 2021 à 10:55, Michael Kuhn <mik@adminkuhn.ch> a écrit :
Hi Jonathan
auto_too_late can only be set if no_auto_renewal_after or no_auto_renewal_after_hard_limit are set.
Check and confirm their values in the DB directly (not from the UI).
Rule "no_auto_renewal_after" is set to value 3 in table "circulation_rules":
MariaDB [koha_hfs]> select * from circulation_rules; +-----+------------+--------------+----------+----------------------------------+---------------+ | id | branchcode | categorycode | itemtype | rule_name | rule_value | +-----+------------+--------------+----------+----------------------------------+---------------+ ... | 147 | NULL | S | NULL | no_auto_renewal_after | 3 | | 148 | NULL | ST | NULL | no_auto_renewal_after | 3 | | 149 | NULL | T | NULL | no_auto_renewal_after | 3 | | 150 | HFS | S | NULL | no_auto_renewal_after | 3 | | 151 | HFS | ST | NULL | no_auto_renewal_after | 3 | | 152 | HFS | T | NULL | no_auto_renewal_after | 3 | | 154 | NULL | S | NULL | auto_auto_renewal_after_hard_limit | | | 155 | NULL | ST | NULL | no_auto_renewal_after_hard_limit | | | 156 | NULL | T | NULL | no_auto_renewal_after_hard_limit | | | 157 | HFS | S | NULL | no_auto_renewal_after_hard_limit | | | 158 | HFS | ST | NULL | no_auto_renewal_after_hard_limit | | | 159 | HFS | T | NULL | no_auto_renewal_after_hard_limit | | ...
What I don't understand is that Koha first says "auto_too_soon" and then "auto_too_late" - when does Koha think it is time to autorenew in this case? It seems like it is always too soon or too late but never time to autorenew.
Best wishes: Michael -- Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz T 0041 (0)61 261 55 61 · E mik@adminkuhn.ch · W www.adminkuhn.ch
Le sam. 16 janv. 2021 à 13:28, Michael Kuhn <mik@adminkuhn.ch> a écrit :
Hi
Our library works with Koha 20.05.02 on Debian GNU/Linux 10.
The automatic renewal doesn't work as expected. These are the relevant circulation rules:
* Loan period: 28 * Unit: Days * Renewals allowed (count): 5 * Renewal period: 28 * No renewal before: (empty) - according to https://bywatersolutions.com/education/setting-up-auto-renewals-with-new-fea... it is said that a blank value will indicate that the auto-renewal will occur on the day it is due. * Automatic renewal: Yes * No automatic renewal after: (empty) * No automatic renewal after (hard limit): (empty)
In the staff client we can see the checkouts of the users - but for every checkout it says "0 Can no longer be auto-renewed - number of checkout days exceeded (5 of 5 renewals remaining)". In fact NONE of these checkouts were EVER auto-renewed.
As we see in table "issues" the value in column "auto_renew" is "1". But the value in column "auto_renew_error" changes from NULL to "auto_too_soon" after the checkout day, then after some days to "auto_too_late". No auto renewal is ever performed.
We have set system preference "RenewalLog" to "Log" but no renewal actions are ever logged.
How can we get auto renewal get to work properly?
Best wishes: Michael -- Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz T 0041 (0)61 261 55 61 · E mik@adminkuhn.ch · W www.adminkuhn.ch _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha