Koha How-To

Koha Question of the Week: I Accidentally Deleted a Shelving Location that was Still in Use - How Do I Find the Items Using it Now?

Each Friday, we will bring you a new Koha Question of the Week. We will select real questions that we receive and share the answers with you!

Question: I Accidentally Deleted a Shelving Location that was Still in Use - How Do I Find the Items Using it Now?

Answer: One way to find items using a location code (or other authorized value) that has since been deleted is certainly using a report. However, there's another powerful tool to identify items using an authorized value that no longer exists: item search.

Once hidden away under a drop-down for the search menu, item search is a dark horse resource of Koha that can do a lot of things a SQL report can do, in a format that is more accessible to a lot of Koha users.

In the case of a shelving location that gets deleted before its items are batch changed to a new location, we can run an item search to find items where the shelving location is not in any of the existing authorized values.

Specifically for a search like that, we want to select all of the provided shelving locations, not the 'all locations' value. This targets your search to only the items that have something in that field with those values not matching current options, not items that don't have any value there (like records where ebook holdings are kept in the catalog and just not given a shelving location, for example).

The item search results can be exported to csv to look at in more detail via spreadsheet software, and then trimmed to just the barcode column for use with the batch editing tool, now located in the cataloging module.

Some parameters in the item search will work better for this sort of maintenance than others - for any of the fields like lost, withdrawn, damaged, or not for loan that have a numeric value, the default value for those fields is 0, so an 'is not' search will return both items that don't have any status in addition to statuses that may since have been removed from the list of authorized values. For a search like that, a report will provide more meaningful results because it can search for a specific value, not just any value outside of the existing options.

If you haven't used item search to generate shelf lists or audit shelving locations or other item data, it's worth trying out and exploring.

Additional Resources

Koha Question of the Week: How Do I Open Report Results in Excel or Another Spreadsheet Software?

Koha Question of the Week: How to Export a Set of Barcodes?

Monday Minutes: Exporting Items in Item Search