[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 30 14:53:33 CEST 2022


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

Peter Vashchuk <stalkernoid at gmail.com> changed:

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

--- Comment #11 from Peter Vashchuk <stalkernoid at gmail.com> ---
Created attachment 135448
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135448&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