[Koha-bugs] [Bug 27426] Plugin barcode must keep leading zeros
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jan 14 05:40:53 CET 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27426
David Cook <dcook at prosentient.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcook at prosentient.com.au
--- Comment #2 from David Cook <dcook at prosentient.com.au> ---
It's an interesting idea, but I think that it is incompatible with Bug 26328.
Explicitly casting to an integer is needed in Bug 26328 because barcode may not
be an integer even in a database with autoBarcode set to "incremental", which
can cause lots of problems.
Hmm one way to solve both Bug 26328 and Bug 27426 could be to use the following
SQL:
SELECT barcode FROM items WHERE CAST(barcode AS unsigned) ORDER BY CAST(barcode
AS unsigned) DESC LIMIT 1;
It's an ugly bit of SQL but it should work.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list