[Bug 6981] New: barcode not incrementing
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6981 Bug #: 6981 Summary: barcode not incrementing Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: critical Priority: P5 Component: Cataloging AssignedTo: gmcharlt@gmail.com ReportedBy: nengard@gmail.com QAContact: koha-bugs@lists.koha-community.org CC: ian.walls@bywatersolutions.com I have autobarcode on to just increment by 1 and in recent releases of master I have noticed that it stopped incrementing at 2345678765345431 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6981 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@enger.priv.no --- Comment #1 from Magnus Enger <magnus@enger.priv.no> 2011-10-06 12:46:46 UTC --- Could this be similar to the problem described in bug 6944? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6981 --- Comment #2 from Nicole C. Engard <nengard@gmail.com> 2011-10-06 12:56:47 UTC --- that's why i included the barcode in question .. in case it is the same problem, but i don't know how to find out. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6981 --- Comment #3 from Magnus Enger <magnus@enger.priv.no> 2011-10-06 13:09:41 UTC --- Try something like "update <table> set <column> = 2345678765345432 where <column> = 2345678765345431;" and see what happens, maybe? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6981 --- Comment #4 from Nicole C. Engard <nengard@gmail.com> 2011-10-06 13:22:42 UTC --- mysql> update items set barcode = 2345678765345432 where barcode = 2345678765345431; Query OK, 0 rows affected (0.01 sec) Rows matched: 0 Changed: 0 Warnings: 0 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6981 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #5 from Marc Véron <veron@veron.ch> --- It seems that it is an issue of representation of numbers in Perl. Up to a certain value they are repersented as integers, then as float, and that leads to a loss of precision. I did the following test: Using MySQL, set the highest value in the table to 2345678765345430 Adding an item, the form displays 2345678765345431 (as expected) Following item sticks with 2345678765345431 (as described in the bug report) However: I you set the value to 2345678765345435 the form will show a value of 2345678765345441 (!) This is the code snippet in barcode.pl (around line 90): ----snip---- elsif ($autoBarcodeType eq 'incremental') { # not the best, two catalogers could add the same barcode easily this way :/ $query = "select max(abs(barcode)) from items"; my $sth = $dbh->prepare($query); $sth->execute(); while (my ($count)= $sth->fetchrow_array) { $nextnum = $count; } $nextnum++; } ----end snip---- About numbers in Perl: http://perldoc.perl.org/perlnumber.html Maybe the issue could be solved with http://perldoc.perl.org/Math/BigInt.html Following questions should be considered: - Side effects with BigInt? - If the correct new number can be transferred into the java script code, what happens when writing back the number into the database? - What about the comment in the code snippet: # not the best, two catalogers could add the same barcode easily this way :/ ? -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6981 --- Comment #6 from Marc Véron <veron@veron.ch> --- Could be resolved together with Bug 7911 - Greater flexibility in auto barcode number generation -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6981 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Severity|critical |normal -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6981 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Marc Véron <veron@veron.ch> --- Could no longer reproduce the issue on current master 3.19.00.005 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org