[Koha] RES: To batch change the returns / check-in

Jose Ricardo Quaglio jose.quaglio at saobernardo.sp.gov.br
Fri Apr 17 06:26:10 NZST 2020

Hi Alex,


thank you for your return,


The proposal is, to determine a date for each day, after 03/17/2020.


As the commands are sent to the Informatica Department, I need to describe which of the bases will be modified, in this case, koha_biblio.


To avoid unnecessary reports, I deactivated on 3/16, all instances of Koha.


Thanks again for all the information,


Thank you,



Jose Ricardo Quaglio


Informatização de Bibliotecas - SC.211.3


Secretaria de Cultura


Município de São Bernardo do Campo


Tel.: +55 11 2630.9394



De: Alex Buckley [mailto:alexbuckley at catalyst.net.nz] 
Enviada em: quarta-feira, 15 de abril de 2020 19:39
Para: koha at lists.katipo.co.nz; jose.quaglio at saobernardo.sp.gov.br
Assunto: Re: To batch change the returns / check-in


Hi Jose, 

Yes you're right at present in all versions of Koha 18.11 currently available the only way to bulk extend due dates of existing issues is in the database. 

A couple of suggestions I have for your query are:

*	Currently your query only changes the date_due of issues due on one day 17 March 2020. If you're goal is to extend all issues that have been due on 17 March till today's date (i.e. issues due on 17 March, 18 March, 19 March and so on) then what you could do instead is:

UPDATE issues SET date_due="2020-04-29 23:59:00",
lastreneweddate="2020-04-15 15:01:00" WHERE date_due > '2020-03-17';

This will extend the due date to 29 April 2020 for any item that has been due between 17 March and today.

*	Also you will not need to specify the database name koha_biblio because to get into the Koha database shell you'll be specifying the database name, like so:

sudo koha-mysql koha_biblio


How this would affect anything else:

Any overdue issues due before 17 March will not be extended with the above amended query. Therefore you should consider doing the following:

*	 Stop overdue notices being generated

You can do this one of two ways: 

- If you want all notices (overdue, advance, hold and password reset notices) to stop being sent during the lockdown you can run:

sudo koha-email-disable <instancename>

This stops notices being sent but they are still generated. Therefore when the lockdown is over you will need to:

- Delete notices in the message_queue database table which have a time_queued value of during the lockdown, otherwise all overdue notices generated during the lockdown will be sent

- Re-enable email

sudo koha-email-enable <instancename>



- Comment out overdue_notices.pl in the /etc/cron.daily/koha-common file

This will stop overdue notices being generated at all during the lockdown. 


*	Stop overdue fines accruing during the lockdown for those overdues due before 17 March 2020

- Set finesMode system preference to  'Calculate (but only for mailing to the administrator)'


*	Stop patrons being charged the replacement cost of items (only applies if you are using the 
DefaultLongOverdueChargeValue system preference)

Remove the value from the DefaultLongOverdueChargeValue system preference.


Just to let you know soon (probably around 24th April ) Koha 18.11.16 will be available to upgrade to and that has the wonderful feature of allowing you to bulk extend due dates in the Koha staff client as this excellent blog post by my colleague Aleisha Amohia outlines: https://www.catalyst.net.nz/blog/koha-let-people-read-longer

Please let me know if you have any questions at all!

Many thanks,


Alex Buckley
Koha Developer
Catalyst IT - Expert Open Source Solutions
DDI: +64 4 803 2378 | Mob: +64 22 429 6157 | www.catalyst.net.nz
CONFIDENTIALITY NOTICE: This email is intended for the named recipients only. It may contain privileged, confidential or copyright information. If you are not the named recipient, any use, reliance upon, disclosure or copying of this email or its attachments is unauthorised. If you have received this email in error, please reply via email or call +64 4 499 2267.

More information about the Koha mailing list