Bug 38862 - Add plugin hooks to transform searches
Summary: Add plugin hooks to transform searches
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Plugin architecture (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-10 17:01 UTC by Andrew Fuerste-Henry
Modified: 2025-01-10 17:01 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2025-01-10 17:01:05 UTC
For libraries with physical barcodes on their items that do not match the barcode value in the record (and for whom re-barcoding is not feasible), the barcode transformation plugin hook allows any action with a barcode to be transformed via regex -- so if your physical barcode reads "T000123" but your record reads "123", you can remove the "T000." This transformation is also applied to searches of the barcode index.

However, that library will still not find their record in a keyword search for "T000123." We should add a plugin hook to allow regex transformation of searches generally. While I imagine this will generally be used in tandem with the barcode transform hook, it seems more flexible to keep them distinct.

This plugin hook would have the potential to cause a lot of confusion and really mess up searches if configured poorly, but I feel the utility outweighs the potential for error.