[Bug 40176] New: Add maxLength to the item definition
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 Bug ID: 40176 Summary: Add maxLength to the item definition Change sponsored?: --- Product: Koha Version: 24.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com -- 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=40176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40175 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40175 [Bug 40175] [OMNIBUS] Missing maxLength to REST API specs -- 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=40176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40174 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174 [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests -- 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=40176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|24.11 |unspecified -- 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=40176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40177 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40177 [Bug 40177] Add maxLength to the library definition -- 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=40176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=40176 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 183364 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183364&action=edit Bug 40176: Add tests This patch adds a new subtest to xt/api.t It ensures that maxLength will appear in the rest api spec file when there is a size constraint at the DB level -- 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=40176 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 183365 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183365&action=edit Bug 40176: Add maxLength to item spec file Test plan: Apply the "tests" patch first prove xt/api.t => fail Apply this patch => pass -- 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=40176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | -- 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=40176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|40174 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174 [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183364|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 183526 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183526&action=edit Bug 40176: Add tests This patch adds a new subtest to xt/api.t It ensures that maxLength will appear in the rest api spec file when there is a size constraint at the DB level Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183365|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 183527 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183527&action=edit Bug 40176: Add maxLength to item spec file Test plan: Apply the "tests" patch first prove xt/api.t => fail Apply this patch => pass Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183526|0 |1 is obsolete| | --- Comment #5 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 183734 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183734&action=edit Bug 40176: Add tests This patch adds a new subtest to xt/api.t It ensures that maxLength will appear in the rest api spec file when there is a size constraint at the DB level Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183527|0 |1 is obsolete| | --- Comment #6 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 183735 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183735&action=edit Bug 40176: Add maxLength to item spec file Test plan: Apply the "tests" patch first prove xt/api.t => fail Apply this patch => pass Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |matt.blenkinsop@openfifth.c |y.org |o.uk CC| |matt.blenkinsop@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.02 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 --- Comment #8 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40433 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40433 [Bug 40433] Missing maxLength in item, patron and library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 Andrii Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com --- Comment #10 from Andrii Nugged <nugged@gmail.com> --- usability note: on Kohas with MANY wrong barcodes this change (very strict) prevented it from loading a number of bibilios and that stopped whole Koha department from work for a while: required everyone to fix the barcodes in one day otherwise it blocks the usage. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 --- Comment #11 from Andrii Nugged <nugged@gmail.com> --- Also especially barcode-wise: because it wasn't limited before, some libraries used some prefixes to stort the database, for example I saw "temp_barcode:..code..,new:..code.." and other usage like holding some extra info in barcodes, now they get instant requirement to align their database and fix the barcodes in all records otherwise they even won't show in details.tt because API will die. Some of our customers used non-printable barcode for some special codification, and it was something like "MovedBRANCHIDinum12312123" and other customizations, which helped them to sort the books and expand usage of barcode field to something wider. This now requires to re-think how to use barcodes and change business logic, and even more – will require to asap fix of database, and what's worse - manual or some complex batch, because wrong barcodes records won't be shown after 25.05.02 update (and seems 24.11.recent people also getting this issue). This really blocked number of libraries. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- As the barcode is varchar(20) in the database, it woudl mean that those libraries in question have updated the field to a different datatype previously, is that correct? Maybe if this causes a lot of issues the barcode field could be extended in the database and in the API by default? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Did you file a separate bug yet? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #14 from David Cook <dcook@prosentient.com.au> --- (In reply to Andrii Nugged from comment #10)
usability note:
on Kohas with MANY wrong barcodes this change (very strict) prevented it from loading a number of bibilios and that stopped whole Koha department from work for a while: required everyone to fix the barcodes in one day otherwise it blocks the usage.
(In reply to Andrii Nugged from comment #11)
Some of our customers used non-printable barcode for some special codification, and it was something like "MovedBRANCHIDinum12312123" and other customizations, which helped them to sort the books and expand usage of barcode field to something wider. This now requires to re-think how to use barcodes and change business logic, and even more – will require to asap fix of database, and what's worse - manual or some complex batch, because wrong barcodes records won't be shown after 25.05.02 update (and seems 24.11.recent people also getting this issue).
This really blocked number of libraries.
(In reply to Katrin Fischer from comment #12)
As the barcode is varchar(20) in the database, it woudl mean that those libraries in question have updated the field to a different datatype previously, is that correct? Maybe if this causes a lot of issues the barcode field could be extended in the database and in the API by default?
As Katrin says, it sounds like you customized Koha database schemas for your customers, and then experienced problems when you applied this patch, because there was a discrepancy between upstream Koha and your downstream Koha. But that's not an upstream issue. This change is logical for upstream Koha. If you're going to customize Koha downstream, the onus is on you to test your customizations to make sure they work before putting them into a production environment. It's why I typically advise people not to change the database schema downstream. It's too risky. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 --- Comment #15 from David Cook <dcook@prosentient.com.au> --- On a similar note, Andrii, you'll want to look out for bug 40508, as this also sets the maxLength for barcode, but at the MARC Bibliographic framework level. It should only apply to new Koha instances and not existing ones, but still good for you to watch out for that one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED CC| |david@davidnind.com --- Comment #16 from David Nind <david@davidnind.com> --- API-related change, no changes required to the manual. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk Blocks|40433 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40433 [Bug 40433] Missing maxLength in item, patron and library -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org