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…

damaged-status-select

…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:

damaged-status

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:

UPDATE items
SET damaged=’Damaged – available’
WHERE itemnumber=’1681′;

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:

authorised-values-wrong

We updated these values to be numeric:

authorised-values-right

Et voila! The value is correctly altered when the damaged status is set on the front end:

damaged-status-set

Damaged Goods
Tagged on: