Koha How-To

Option to Add More Fields in the Item with a New Koha Plugin

The item messages plugin for Koha will allow libraries to add and edit notes/messages related to a specific item. These messages or notes can be added to the item through the "more detail" tab. This plugin is extremely helpful to libraries looking to add additional fields to items to store data. This data could include inventory information, additional missing/lost data, historical data, etc.

Plugin

This feature is built by a plugin in Koha. When a plugin is created, there are several reasons why it is created as a plugin as opposed to being created directly into Koha. For some great information about this, read Nick's blog post:

To plug, or not to plug? Why we develop Koha plugins

If you want to learn more about other plugins available in Koha,

Monday Minutes: Plugins in Koha

Additionally, there was a presentation about Plugins in Koha, at the 2022 KohaUS conference:

KohaCon 2022: Leveling up with Plugins

Setup

Notes/Messages can be a free text or can be connected to an value within the authorized category, ITEM_MESSAGE_TYPE. The messages/notes that are added to the item will only be visible via the "more detail" item tab as well as through reports.

Creating the Authorized Value Category

Once the plugin has been installed to the system and plack has been run. The next step is to create the Authorized Value Category.

In the Administration Module - choose Authorized Value. From this page, click on the + New Category.

Create the New Category with the code ITEM_MESSAGE_TYPE

Then a library can determine what the additional fields for the item will be called, such as Inventory Date, Bin Number,or Donation, the choices are limitless on what a library can additionally store in these fields.

If a library would like to create a drop-down choice for these new fields, use the OPAC Description for the values and use a | between the values.

For example, if a library wanted to use a dropdown for where is storage this time was, they could add this:

Item Messages/Notes

Once the authorized category has been added with some values, viewing the item from the Items Tab will display these additional fields and allow staff to add and delete.

Reporting

These notes/messages are viewable from the Items Tab as well as reportable. This plugin adds a new table to the Koha Schema and related columns:

This plugin creates a new table item_messages containing the following columns:

  • item_message_id - iternal id for this message, auto increments
  • itemnumber- foreign key to the items table
  • type - ITEM_MESSAGE authorized value
  • message - the actually value for this message
  • created_on - a timestamp for this message