Sunday, September 12, 2021

Importing Bulk Holidays in Koha's Calendar


Libraries can define library closings and holidays to be used when calculating due dates. You can make use of the Calendar by turning on the proper system preferences

Usually, we do create events/holidays manually in the calendar. As a Keralite, adding each holiday one by one may feel difficult every year. because, In Kerala state, we have several state holidays like Onam, Vishu, Mannan Jayanthi, etc. along with national holidays. So here is a solution that came into my mind with a question raised by Mr. Himanshu Aggarwal (Assistant Librarian at R. D. National College, Bandra) in the Koha Users group of Facebook. He was asking how can we import bulk holidays into koha. 

Yes, It is possible, The export and import option of any MySQL/MariaDB client software solves this problem. Koha already has a special_holidays table in the database that allows us to import custom holidays in bulk. 

Firstly, we need to prepare a CSV file containing branchcode, day, month,  year, title, description, etc. you can download a sample CSV file from below and modify it with your data. 

Download Sample File

Secondly, Import the .CSV file directly into the special_holidays table using any MySQL/MariaDB client software like MySQL Workbench/PHPMyAdmin/DBeaver.


NB: I will not be responsible for losing your data, First try with a demo instance and learn.

No comments:

Post a Comment