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

Alex Buckley alexbuckley at catalyst.net.nz
Thu Apr 16 10:39:20 NZST 2020

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:

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