I’ve been working on an installation of Koha for the Central Coast Multicultural Resource Centre. It’s starting to look good but yesterday we discovered we couldn’t set the Damaged Status of an item on the Librarian front end. The drop down is there with a list of values…
…but when you select an option and click on the “Set status” button, nothing happens and it just goes back to the default “Choose” option:
There’s definitely a problem here but it’s unclear exactly what it is. At first I thought it might be a delay related to the Zebra Queue, however having waited for a bit I decided this status was definitely not going to update itself, queue or otherwise.
It turns out this is actually quite a simple issue – it’s a misconfiguration in the Authorized Value list that we set up for the Damaged value – but there is no way of knowing this from looking at the front end. Koha doesn’t display an error message. Here’s what’s happening.
In the back end, Koha is running an update statement to set the damaged field on the items table:
This fails because items.damaged is a tiny int and the update statement is trying to set it to a character string.
The value ‘Damaged – available’ is being sourced from the Authorized Value list for DAMAGED (KOHA > More > Administration > Authorized values > Show Category > DAMAGED). As you can see the settings in ours are all strings:
We updated these values to be numeric:
Et voila! The value is correctly altered when the damaged status is set on the front end: