Main Koha release repository https://koha-community.org
Find a file
David Cook 3081128ec8 Bug 26328: Cast barcode from varchar to integer for incremental barcode
Without this patch, the incremental barcode generation will
treat 978e0143019375 as having an exponent and interpret it as a very
large number.

With this patch, the incremental barcode generation will first cast
barcode varchar strings to integers before finding a max() value.
In this case 978e0143019375 becomes 978 instead of
1.7976931348623157e308

Test plan:

0. Using koha-testing-docker

Before applying patch:

1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=autobarcode
2. Set to "generated in the form 1, 2, 3"
3. Go to http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=1#additema&searchid=scs_1607059974968
4. Add item with barcode 978e0143019375
5. Click "p - Barcode"
6. Note the barcode is "Inf"

After applying patch:
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=1#additema&searchid=scs_1607059974968
2. Click "p - Barcode"
3. Note the barcode is "39999000019194"

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-23 10:50:51 -10:00
acqui Bug 29771: Remove trivial cases 2022-03-08 23:03:34 -10:00
admin Bug 19532: Database and installer stuff 2022-03-14 22:45:50 -10:00
api Bug 30165: Make q parameter 'multi' 2022-03-22 10:17:33 -10:00
authorities Bug 29334: Do not apply defaultvalue to existing auth record 2021-11-15 12:38:39 +01:00
basket Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
bin
C4 Bug 26328: Cast barcode from varchar to integer for incremental barcode 2022-03-23 10:50:51 -10:00
catalogue Bug 30008: (bug 29690 follow-up) Fix Invalid data, cannot decode metadata object 2022-03-22 10:17:34 -10:00
cataloguing Bug 29788: (follow-up) Make Koha::Item->safe_to_delete use Koha::Result::Boolean 2022-03-23 10:50:51 -10:00
circ Bug 30155: Don't get items that can fillholds if there are no holds 2022-03-15 22:30:50 -10:00
clubs Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
course_reserves
debian Bug 26685: Move starman out of debian/control.in and into cpanfile 2022-03-22 10:17:34 -10:00
docs Revert "Bug 20076: Add Thibaud Guillot to contributors" 2022-01-13 22:12:53 -10:00
errors
etc Bug 18540: Update MARC21 biblio XSL file 2022-01-18 21:15:04 -10:00
ill Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
installer Bug 27812: DBRev 21.12.00.019 2022-03-17 11:22:56 -10:00
Koha Bug 29802: add 'me' to filter_by_visible_in_opac query 2022-03-23 10:50:51 -10:00
koha-tmpl Bug 30161: Remove duplicate z3950_search include 2022-03-22 10:17:34 -10:00
labels Bug 25616: (QA follow-up) Catch a case in labels/label-item-search.pl 2022-02-24 14:35:36 -10:00
lib/CGI/Session/Serialize
members Bug 17648: (QA follow-up) Restore imediate sending of the notice 2022-03-17 11:22:56 -10:00
misc Bug 29486: Add check in search_for_data_inconsistencies.pl 2022-03-22 10:17:34 -10:00
offline_circ Bug 29255: Built-in offline circulation broken with SQL error 2021-11-15 12:38:39 +01:00
opac Bug 29940: Don't surround value by quote 2022-03-22 10:17:34 -10:00
patron_lists Bug 16446: Add ability to add patrons to list by borrowernumber 2021-10-21 12:24:04 +02:00
patroncards Bug 28576: Update the maximum size of an image. 2022-02-14 21:41:38 -10:00
plugins Bug 29931: Check cookie status before continuing 2022-03-15 22:30:50 -10:00
pos Bug 28481: (RM follow-up) formatting 2021-12-16 12:13:51 -10:00
recalls Bug 19532: (RM follow-up) Fix recalls.old is default 0 2022-03-15 00:31:32 -10:00
reports Bug 30253: Remove a double mana_success parameter 2022-03-22 10:17:34 -10:00
reserve Bug 19532: Recalls on intranet 2022-03-14 22:45:51 -10:00
reviews
rotating_collections
serials Bug 25616: Uppercase hard coded lower case boolean operators for Elasticsearch 2022-02-24 14:35:36 -10:00
services
skel
suggestion Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
svc Bug 29931: (follow-up) Fix svc/checkouts and return_claims too 2022-03-15 22:30:50 -10:00
t Bug 29802: Unit tests 2022-03-23 10:50:51 -10:00
tags Bug 29469: (bug 17600 follow-up) Fix tag approval/rejection from staff 2021-11-16 15:49:22 +01:00
tmp/modified_authorities
tools Bug 19532: (RM follow-up) More use of system preference 2022-03-14 23:11:12 -10:00
virtualshelves Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
xt Bug 28617: (QA follow-up) Restore FindBin in two places 2021-12-07 12:16:28 -10:00
.editorconfig Bug 27375: Set YAML file settings in .editorconfig 2021-11-03 15:40:52 +01:00
.eslintrc.json
.gitignore
.htaccess
.mailmap 21.11.00 - Update .mailmap 2021-11-26 12:26:22 +01:00
.perlcriticrc
.proverc.dist Bug 19821: Install sample data, ES mappings and Version syspref 2021-10-25 11:27:40 +02:00
.scss-lint.yml
about.pl
app.psgi
changelanguage.pl
cpanfile Bug 26685: Move Starman out of debian/control.in and into cpanfile (2) 2022-03-22 10:17:34 -10:00
fix-perl-path.PL
gulpfile.js
help.pl
INSTALL
Koha.pm Bug 27812: DBRev 21.12.00.019 2022-03-17 11:22:56 -10:00
koha_perl_deps.pl
kohaversion.pl
LICENSE
mainpage.pl Bug 29020: Add link on the mainpage for users without admin access 2021-10-19 09:29:09 +02:00
Makefile.PL Bug 19532: Database and installer stuff 2022-03-14 22:45:50 -10:00
MANIFEST.SKIP
package.json
README
README.md
README.robots
rewrite-config.PL
yarn.lock

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo