[Bug 21203] New: ILS-DI - GetRecords crashes on non-existent records
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Bug ID: 21203 Summary: ILS-DI - GetRecords crashes on non-existent records Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: major Priority: P5 - low Component: Web services Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 18255 Caused by commit cb336e633bf7e0cb25051a8ed8157af8486a58d7 Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with Koha::Biblio->biblioitem Can't call method "biblioitem" on an undefined value at /home/vagrant/kohaclone/C4/ILSDI/Services.pm line 212 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18255 [Bug 18255] Koha::Biblio - Remove GetBiblioItemByBiblioNumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77688 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77688&action=edit Bug 21203: ILS-DI - Make GetRecords handle non-existent records Caused by commit cb336e633bf7e0cb25051a8ed8157af8486a58d7 Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with Koha::Biblio->biblioitem Can't call method "biblioitem" on an undefined value at /home/vagrant/kohaclone/C4/ILSDI/Services.pm line 212 Test plan: - Enable ilsdi - hit /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=X With X an existing biblionumber and a non existing one Both requests must succeed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21202 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21202 [Bug 21202] C4::Items - Remove GetItemsByBiblioitemnumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- QA Comment: Can we 100% guarantee that there is always 1 and only 1 biblioitem attached to a biblio object? Looking at the dbic schema it appears there's no db level constraint for this (it's a has_many relationship), looking a level up in the Koha::Biblio object it appears we do indeed fire a ->find rather than using the underlying dbic relationship, which suggests there's only 1 (or 0) biblioitem attached to a biblio but there's no test to confirm we actually get a biblioitem object back. I'd love to see the underlying db constraints added, but would accept a second check that the biblioitem exists before calling unblessed upon it. Perhaps I'm being over cautious? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Martin Renvoize from comment #2)
QA Comment: Can we 100% guarantee that there is always 1 and only 1 biblioitem attached to a biblio object?
Looking at the dbic schema it appears there's no db level constraint for this (it's a has_many relationship), looking a level up in the Koha::Biblio object it appears we do indeed fire a ->find rather than using the underlying dbic relationship, which suggests there's only 1 (or 0) biblioitem attached to a biblio but there's no test to confirm we actually get a biblioitem object back.
I'd love to see the underlying db constraints added, but would accept a second check that the biblioitem exists before calling unblessed upon it.
Perhaps I'm being over cautious?
I do not think this is valid, biblio and biblioitem must be considered 1-1, we discussed it several times on the mailing lists. Both tables must be merged, but it's a huge work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I agree with Jonathan - there are bigger issues with our database structure, but assuming 1:1 is safe for now and we should fix this bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- OK, I'm happy with that then.. I must have missed the mailing list conversations regarding their 1-1ness during my absence. I'll go ahead and complete the QA then. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77688|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 77777 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77777&action=edit Bug 21203: ILS-DI - Make GetRecords handle non-existent records Caused by commit cb336e633bf7e0cb25051a8ed8157af8486a58d7 Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with Koha::Biblio->biblioitem Can't call method "biblioitem" on an undefined value at /home/vagrant/kohaclone/C4/ILSDI/Services.pm line 212 Test plan: - Enable ilsdi - hit /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=X With X an existing biblionumber and a non existing one Both requests must succeed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Sorry.. I meant signoff rather than qa there.. Signed Off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77777|0 |1 is obsolete| | --- Comment #8 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 77887 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77887&action=edit Bug 21203: ILS-DI - Make GetRecords handle non-existent records Caused by commit cb336e633bf7e0cb25051a8ed8157af8486a58d7 Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with Koha::Biblio->biblioitem Can't call method "biblioitem" on an undefined value at /home/vagrant/kohaclone/C4/ILSDI/Services.pm line 212 Test plan: - Enable ilsdi - hit /cgi-bin/koha/ilsdi.pl?service=GetRecords&id=X With X an existing biblionumber and a non existing one Both requests must succeed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.03. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21203 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED --- Comment #11 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Depends on Bug 18255 not in 17.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org