[Bug 20206] New: Should GetItemnumberFromBarcode ignore leading zeroes?
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Bug ID: 20206 Summary: Should GetItemnumberFromBarcode ignore leading zeroes? Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org GetItemnumberFromBarcode will not find 51320 if it should be 051320. Could we need that? I noticed that Excel stripped leading zeroes and we got missing messages in Inventory. Anyone interested in a patch like the attached one? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 71650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71650&action=edit Bug 20206: Add leading zeroes in GetItemnumberFromBarcode -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | Status|NEW |ASSIGNED --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Not for NSO yet, awaiting feedback -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think we should look for an exact match, otherwise you might end up changing the wrong items and that seems too dangerous. Maybe it could be optional. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #3)
I think we should look for an exact match, otherwise you might end up changing the wrong items and that seems too dangerous. Maybe it could be optional.
Thx. But having both 51320 and 051320 seems dangerous to me too. Not sure if Koha should support that everywhere in the codebase.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I don't think it should be a problem where SQL is concerned and I don't think I have ever seen an issue reported related to this. I feel we should not try and limit options where it's not strictly necessary as libraries might be working with a weird mix of barcodes from migrations and even more so in consortia. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pasi.kallinen@joensuu.fi --- Comment #6 from paxed <pasi.kallinen@joensuu.fi> --- Agree with Katrin and Marcel, this sounds dangerous - matching like this should always be done exactly. Perhaps some places have barcodes that would then match multiples, because some are longer or shorter. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|ASSIGNED |RESOLVED --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- It sounds better to solve this in inventory only. Will keep it at custom level for now.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|WONTFIX |--- Status|CLOSED |REOPENED Summary|Should |Should inventory accept |GetItemnumberFromBarcode |leading zeroes in a |ignore leading zeroes? |barcode? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #7)
It sounds better to solve this in inventory only. Will keep it at custom level for now..
A second try? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to paxed from comment #6)
Agree with Katrin and Marcel, this sounds dangerous - matching like this should always be done exactly. Perhaps some places have barcodes that would then match multiples, because some are longer or shorter.
If a system would contain barcode 1 and barcode 01 and we would just allow that, it would be more dangerous imo. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Architecture, internals, |Tools |and plumbing | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #71650|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Should inventory accept |Inventory: barcodes without |leading zeroes in a |or with extra leading |barcode? |zeroes are reported not | |found -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 109236 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109236&action=edit Bug 20206: Find barcodes with more or less leading zeroes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Bit unpolished yet, but the idea is if you find multiple barcodes, report them on inventory -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #109236|0 |1 is obsolete| | --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 109369 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109369&action=edit Bug 20206: Find barcodes with more or less leading zeroes Test plan: Pick an item, change barcode to e.g. 0123456 Create a barcode file with 123456. Run inventory with it. Should be found and modified. Change barcode file by modifying 123456 to 00123456. Same result. Change barcode of another item to 000123456. Run inventory again on same barcode file: 0 modified, warn on duplicates? Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Note that we have the following problem locally: we have 0123 on the barcode but the RFID says 123. We have 0123 in the database. So scanning the barcode is not a problem (check in/out), but the RFID scanner gives 123 to inventory and that is a problem. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- If you scan a barcode 0123, the inventory tool will find the item too if it has barcode 123 or even 00123 in the database. But if it finds multiple barcodes with this pattern, it will report a duplicates error. Would this behavior be problematic for a library? I strongly think that if you have such data (both barcode 123 as well as 0123 in your table), you should be warned about it and correct it. Obviously we can add a pref here, but do we want a pref to tolerate bad data? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Hakam Almotlak <hakam.almotlak@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hakam.almotlak@inLibro.com --- Comment #15 from Hakam Almotlak <hakam.almotlak@inLibro.com> --- Hey i applied the patch and created an item with 0123456 then another item with 00123456 and i tried to check in with the code 123456 and it says no item with this code. i checked the database and the code 0123456 and 00123456 exist in the database, but i can`t find it when i check in it does not exclude the zeros at the begging of the code. that is the database output: MariaDB [koha_master_dev_inlibro]> select barcode from items; +----------+ | barcode | +----------+ | NULL | | 00123456 | | 0123456 | | 111 | | 77777 | | 88888 | | 99999 | +----------+ 7 rows in set (0.001 sec) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Hakam Almotlak from comment #15)
Hey i applied the patch and created an item with 0123456 then another item with 00123456 and i tried to check in with the code 123456 and it says no item with this code. i checked the database and the code 0123456 and 00123456 exist in the database, but i can`t find it when i check in it does not exclude the zeros at the begging of the code.
Hi Hakam, Thx for testing. This patch only deals with the Tools/Inventory program. So it does not include the regular checkin. Please try the barcodes you created in the test plan of this patch with the tools/inventory script. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #17 from Hakam Almotlak <hakam.almotlak@inLibro.com> --- thanks for the explaining i tested it and it works perfectly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Hakam Almotlak <hakam.almotlak@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #109369|0 |1 is obsolete| | --- Comment #18 from Hakam Almotlak <hakam.almotlak@inLibro.com> --- Created attachment 122351 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122351&action=edit Bug 20206: Find barcodes with more or less leading zeroes Test plan: Pick an item, change barcode to e.g. 0123456 Create a barcode file with 123456. Run inventory with it. Should be found and modified. Change barcode file by modifying 123456 to 00123456. Same result. Change barcode of another item to 000123456. Run inventory again on same barcode file: 0 modified, warn on duplicates? Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: hakam <hakam@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Hakam Almotlak <hakam.almotlak@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #19 from Hakam Almotlak <hakam.almotlak@inLibro.com> --- thanks for the explaining i tested it and it works perfectly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Eric Bégin <eric.begin@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|hakam.almotlak@inLibro.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |kyle@bywatersolutions.com --- Comment #20 from Kyle M Hall <kyle@bywatersolutions.com> --- I can't see any way we can get this in without at least a syspref or some other way to make this optional. I'm also a bit concerned about the regex performance, but the syspref should take care of that for anyone not using the feature. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 --- Comment #21 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Kyle M Hall from comment #20)
I can't see any way we can get this in without at least a syspref or some other way to make this optional. I'm also a bit concerned about the regex performance, but the syspref should take care of that for anyone not using the feature.
My first impression would be to just leave it here. Perhaps a plugin. Not sure for now. I wont add a pref probably. If there was more interest, people had their chance since 2018.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED Resolution|--- |WONTFIX --- Comment #22 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Bye bye -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20206 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org