[Bug 18262] New: Koha::Biblios - Remove GetBiblioData - part 1
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Bug ID: 18262 Summary: Koha::Biblios - Remove GetBiblioData - part 1 Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17628 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17628 [Bug 17628] Move bibliographic related code to Koha::Biblio -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 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=18262 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61054&action=edit Bug 18262: Koha::Biblio - Remove GetBiblioData - part 1 Most of the time C4::Biblio::GetBiblioData is used to retrieve the title and/or the author of a bibliographic record. This patch replaces the easy occurrences of GetBiblioData, the ones where the 2 joins are needed, but only data from biblio and biblioitems table are. Test plan: It will be hard to test everything, I'd suggest a QAer to review this patch and confirm that the difference occurrences of GetBiblioData have been correctly replaced by calling Koha::Biblios->find or $biblio->bibioitem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #2 from Marc Véron <veron@veron.ch> --- Small typo found: opac/opac-addbybiblionumber.pl line 145 my $biblio = Koha::Biblios->fin( $biblionumber ); should be: my $biblio = Koha::Biblios->find( $biblionumber ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61054|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61058 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61058&action=edit Bug 18262: Koha::Biblio - Remove GetBiblioData - part 1 Most of the time C4::Biblio::GetBiblioData is used to retrieve the title and/or the author of a bibliographic record. This patch replaces the easy occurrences of GetBiblioData, the ones where the 2 joins are needed, but only data from biblio and biblioitems table are. Test plan: It will be hard to test everything, I'd suggest a QAer to review this patch and confirm that the difference occurrences of GetBiblioData have been correctly replaced by calling Koha::Biblios->find or $biblio->bibioitem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Jonathan I'll prioritize testing of this patch if you can rebase it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61058|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 63863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63863&action=edit Bug 18262: Koha::Biblio - Remove GetBiblioData - part 1 Most of the time C4::Biblio::GetBiblioData is used to retrieve the title and/or the author of a bibliographic record. This patch replaces the easy occurrences of GetBiblioData, the ones where the 2 joins are needed, but only data from biblio and biblioitems table are. Test plan: It will be hard to test everything, I'd suggest a QAer to review this patch and confirm that the difference occurrences of GetBiblioData have been correctly replaced by calling Koha::Biblios->find or $biblio->bibioitem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63863|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64133 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64133&action=edit Bug 18262: Koha::Biblio - Remove GetBiblioData - part 1 Most of the time C4::Biblio::GetBiblioData is used to retrieve the title and/or the author of a bibliographic record. This patch replaces the easy occurrences of GetBiblioData, the ones where the 2 joins are needed, but only data from biblio and biblioitems table are. Test plan: It will be hard to test everything, I'd suggest a QAer to review this patch and confirm that the difference occurrences of GetBiblioData have been correctly replaced by calling Koha::Biblios->find or $biblio->bibioitem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- I ran into a couple of errors: Global symbol "$bib" requires explicit package name at /home/vagrant/kohaclone/acqui/basketgroup.pl line 199. syntax error at /home/vagrant/kohaclone/opac/opac-addbybiblionumber.pl line 151, near "}" syntax error at /home/vagrant/kohaclone/opac/opac-addbybiblionumber.pl line 164, near "}" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64133|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64148&action=edit Bug 18262: Koha::Biblio - Remove GetBiblioData - part 1 Most of the time C4::Biblio::GetBiblioData is used to retrieve the title and/or the author of a bibliographic record. This patch replaces the easy occurrences of GetBiblioData, the ones where the 2 joins are needed, but only data from biblio and biblioitems table are. Test plan: It will be hard to test everything, I'd suggest a QAer to review this patch and confirm that the difference occurrences of GetBiblioData have been correctly replaced by calling Koha::Biblios->find or $biblio->bibioitem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64148|0 |1 is obsolete| | --- Comment #9 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 64149 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64149&action=edit [SIGNED-OFF] Bug 18262: Koha::Biblio - Remove GetBiblioData - part 1 Most of the time C4::Biblio::GetBiblioData is used to retrieve the title and/or the author of a bibliographic record. This patch replaces the easy occurrences of GetBiblioData, the ones where the 2 joins are needed, but only data from biblio and biblioitems table are. Test plan: It will be hard to test everything, I'd suggest a QAer to review this patch and confirm that the difference occurrences of GetBiblioData have been correctly replaced by calling Koha::Biblios->find or $biblio->bibioitem Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Overall, it looks great. I would love to see (at some point) the Koha::Biblio objects passed to the template instead of explicitly extracting each attribute, but that's a whole other problem. I've found a test to fail with this patch applied, and pass without it: kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Reserves/MultiplePerRecord.tt/db_dependent/Reserves/MultiplePerRecord.t .. 1/38 Can't call method "agerestriction" on an undefined value at /home/vagrant/kohaclone/C4/Reserves.pm line 378. # Looks like your test exited with 255 just after 33. t/db_dependent/Reserves/MultiplePerRecord.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 5/38 subtests Test Summary Report ------------------- t/db_dependent/Reserves/MultiplePerRecord.t (Wstat: 65280 Tests: 33 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 38 tests but ran 33. Files=1, Tests=33, 2 wallclock secs ( 0.02 usr 0.01 sys + 1.53 cusr 0.30 csys = 1.86 CPU) Result: FAIL I'm trying to check what's going but wanted to note it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64827 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64827&action=edit Bug 18262: Fix test in MultiplePerRecord The biblioitem entry must be added -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Tomás Cohen Arazi from comment #10)
Overall, it looks great. I would love to see (at some point) the Koha::Biblio objects passed to the template instead of explicitly extracting each attribute, but that's a whole other problem.
What I did on bug 18789 for Koha::Patron, I'd love to do it for Koha::Biblio too.
I've found a test to fail with this patch applied, and pass without it:
Fixed! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64149|0 |1 is obsolete| | Attachment #64827|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64977 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64977&action=edit Bug 18262: Koha::Biblio - Remove GetBiblioData - part 1 Most of the time C4::Biblio::GetBiblioData is used to retrieve the title and/or the author of a bibliographic record. This patch replaces the easy occurrences of GetBiblioData, the ones where the 2 joins are needed, but only data from biblio and biblioitems table are. Test plan: It will be hard to test everything, I'd suggest a QAer to review this patch and confirm that the difference occurrences of GetBiblioData have been correctly replaced by calling Koha::Biblios->find or $biblio->bibioitem Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64978 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64978&action=edit Bug 18262: Fix test in MultiplePerRecord The biblioitem entry must be added -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Simple rebase. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- You remove this test in Acquisition.pm: if ( $biblioitem->{isbn} - and $order->{isbn} - and $biblioitem->{isbn} eq $order->{isbn} ) - { Looks fine to me, but noting it for the record. opac-search.pl use C4::Biblio; # Unused here? No: I see e.g. GetMarcBiblio -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64977|0 |1 is obsolete| | --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 65045 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65045&action=edit Bug 18262: Koha::Biblio - Remove GetBiblioData - part 1 Most of the time C4::Biblio::GetBiblioData is used to retrieve the title and/or the author of a bibliographic record. This patch replaces the easy occurrences of GetBiblioData, the ones where the 2 joins are needed, but only data from biblio and biblioitems table are. Test plan: It will be hard to test everything, I'd suggest a QAer to review this patch and confirm that the difference occurrences of GetBiblioData have been correctly replaced by calling Koha::Biblios->find or $biblio->bibioitem Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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=18262 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64978|0 |1 is obsolete| | --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 65046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65046&action=edit Bug 18262: Fix test in MultiplePerRecord The biblioitem entry must be added 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=18262 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 65085 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65085&action=edit Bug 18262: Fix C4::XISBN Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The last patch has been pushed to master! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Master |RESOLVED CC| |fridolin.somers@biblibre.co | |m --- Comment #22 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Enhancement not pushed to 17.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19576 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19576 [Bug 19576] opac-detail has duplicate 'use Koha::Biblios;' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18262 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21141 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21141 [Bug 21141] Batch item modification tool throws error 500 when an itemnumber is invalid -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org