Summary: | Ignore whitespace before and after barcodes when adding items to rotating collections | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Tools | Assignee: | Yvonne Waterman <yvonnewaterman> |
Status: | Pushed to stable --- | QA Contact: | Lucas Gass (lukeg) <lucas> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | aleisha, david, lucas, yanjun.li, yvonnewaterman |
Version: | Main | Keywords: | Academy |
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This fixes adding or removing items to a rotating collection (Tools > Patrons and circulation > Rotating collections). If a barcode has a space before it, it is now ignored instead of generating an error message.
|
|
Version(s) released in: |
25.11.00,25.05.03
|
Circulation function: | |
Attachments: |
Bug 31930: Ignore whitespace before and after barcodes
Bug 31930: Ignore whitespace before and after barcodes Bug 31930: Ignore whitespace before and after barcodes Bug 31930: Ignore whitespace before and after barcodes |
Description
Katrin Fischer
2022-10-23 13:31:57 UTC
Hi Katrin, the whitespace doesn't affect the submission in the rotating collection page while adding new collection on my side. Let me know if you still have this issue. Can confirm that barcode whitespace is still not handled well in upstream To reproduce: 1. Go to Tools -> Rotating collections 2. Create a rotating collection 3. Chose Actions -> Manage items 4. Paste a barcode and put some spaces around it, for example " 39999000010053 " 5. Click Submit => Shown an error, no item with matching barcode found, though the barcode is printed without all the whitespace Created attachment 184263 [details] [review] Bug 31930: Ignore whitespace before and after barcodes Decoded the barcode in add items to collection. Test plan: 1. Go to Tools -> Rotating collections 2. Create a rotating collection 3. Chose Actions -> Manage items 4. Paste a barcode and put some spaces around it, for example " 39999000010053 " 5. Click Submit => Shown an error, no item with matching barcode found, though the barcode is printed without all the whitespace 6. Apply patch 7. Repeat steps 1 - 5, barcode should be accepted Created attachment 184264 [details] [review] Bug 31930: Ignore whitespace before and after barcodes Decoded the barcode in add items to collection. Test plan: 1. Go to Tools -> Rotating collections 2. Create a rotating collection 3. Chose Actions -> Manage items 4. Paste a barcode and put some spaces around it, for example " 39999000010053 " 5. Click Submit => Shown an error, no item with matching barcode found, though the barcode is printed without all the whitespace 6. Apply patch 7. Repeat steps 1 - 5, barcode should be accepted Created attachment 184274 [details] [review] Bug 31930: Ignore whitespace before and after barcodes Decoded the barcode in add items to collection. Test plan: 1. Go to Tools -> Rotating collections 2. Create a rotating collection 3. Chose Actions -> Manage items 4. Paste a barcode and put some spaces around it, for example " 39999000010053 " 5. Click Submit => Shown an error, no item with matching barcode found, though the barcode is printed without all the whitespace 6. Apply patch 7. Repeat steps 1 - 5, barcode should be accepted Signed-off-by: David Nind <david@davidnind.com> Nice work Yvonne, and thanks for the patch! I've added a draft release note. David Nind Testing notes (using koha-testing-docker): 1. Before the patch, I was able to successfully add a barcode with spaces after it, but got an error if there were spaces before it. 2. After the patch, things work as expected. 3. Also, not related to this bug, if you remove an item using the action from the table (instead of pasting a barcode into the barcode field), the "Remove item from collection" remains ticked. So another bug to create. Created attachment 184647 [details] [review] Bug 31930: Ignore whitespace before and after barcodes Decoded the barcode in add items to collection. Test plan: 1. Go to Tools -> Rotating collections 2. Create a rotating collection 3. Chose Actions -> Manage items 4. Paste a barcode and put some spaces around it, for example " 39999000010053 " 5. Click Submit => Shown an error, no item with matching barcode found, though the barcode is printed without all the whitespace 6. Apply patch 7. Repeat steps 1 - 5, barcode should be accepted Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Nice work everyone! Pushed to main for 25.11 Nice work everyone! Pushed to 25.05.x |