Bug 31152 - EasyAnalyticalRecords - trim leading whitespace from barcode when linking to host record
Summary: EasyAnalyticalRecords - trim leading whitespace from barcode when linking to ...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-13 20:54 UTC by David Nind
Modified: 2022-07-13 20:55 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Nind 2022-07-13 20:54:19 UTC
When adding analytical record relationships the easy way with the EasyAnalyticalRecords system preference enabled, any leading whitespace in the barcode is not trimmed.

To reproduce:
1. Enable the EasyAnalyticalRecord system preference - change to 'Show'.
2. Copy a barcode from any item, for example: 39999000000498
3. For any record with item, select Edit > Link to host record.
4. Enter item barcode:
   - paste the barcode into the input field
   - put spaces before the barcode
   - press 'Select'.
5. Note error message: "ERROR: Unable to get the item number from this barcode.".

Notes:
- Only leading whitespace causes the error, trailing whitespace does not cause the error.
- Recent bug 30409 did some work on consolidating barcode checking.