[Koha-bugs] [Bug 30409] barcodedecode() should always trim barcode

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 23 12:20:15 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30409

Peter Vashchuk <stalkernoid at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #132885|0                           |1
        is obsolete|                            |

--- Comment #9 from Peter Vashchuk <stalkernoid at gmail.com> ---
Created attachment 135258
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135258&action=edit
Bug 30409: barcodedecode() should always trim barcode

Barcode is trimmed of leading/trailing whitespaces in many instances
before the barcodedecode sub was called. This patch instead makes that
barcodedecode sub is going to trim it itself and removes unnecessary,
and repetitive code that was used before barcodedecode was called.

Steps to test:
1. Edit item with any barcode, add a bunch of whitespaces at the start 
and at the bottom of it. Save the item. Ensure that this action ruins 
the barcode and ensure that the spaces are still there by editing the 
same item again.
2. Apply the patch.
3. Edit the same item again in the same fashion. Ensure that now all 
whitespaces are getting trimmed and it doesn't affect the barcode in 
any negative way.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list