[Bug 28384] New: Add 'no_items' option to TransformMarcToKoha
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28384 Bug ID: 28384 Summary: Add 'no_items' option to TransformMarcToKoha Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org The routine has an 'items' option if you only want item info, we should have the opposite, ignoring items if we don't need them. In C4::Search::searchResults - we ignore the item info returned, skipping processing item lines can save us time -- 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=28384 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=28384 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121146 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121146&action=edit Bug 28384: Add 'no_items' option to TransformMarcToKoha This patch adds a new option 'no_items' and uses it in the C4::Search::searchResults routine. We don't use the item info fetched here, so skipping those lines saves us time. Additionally, I fix an incorrect FIXME comment, and pass the ISBN returned by the routine above into GetNormalizedISBN to save another lookup TO test: 1 - Enable AmazonCoverImages system preference 2 - Search staff client with a term that returns books with covers 3 - Apply patch 4 - prove -v t/db_dependent/Biblio/TransformMarcToKoha.t 5 - Confirm searching works 6 - Confirm Amazon images display (normalized_isbn is used for these) -- 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=28384 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=28384 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=28384 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121146|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 121150 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121150&action=edit Bug 28384: Add 'no_items' option to TransformMarcToKoha This patch adds a new option 'no_items' and uses it in the C4::Search::searchResults routine. We don't use the item info fetched here, so skipping those lines saves us time. Additionally, I fix an incorrect FIXME comment, and pass the ISBN returned by the routine above into GetNormalizedISBN to save another lookup TO test: 1 - Enable AmazonCoverImages system preference 2 - Search staff client with a term that returns books with covers 3 - Apply patch 4 - prove -v t/db_dependent/Biblio/TransformMarcToKoha.t 5 - Confirm searching works 6 - Confirm Amazon images display (normalized_isbn is used for these) 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=28384 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 | Status|Signed Off |BLOCKED CC| |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=28384 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QAing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28384 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|BLOCKED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28384 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121150|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 122418 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122418&action=edit Bug 28384: Add 'no_items' option to TransformMarcToKoha This patch adds a new option 'no_items' and uses it in the C4::Search::searchResults routine. We don't use the item info fetched here, so skipping those lines saves us time. Additionally, I fix an incorrect FIXME comment, and pass the ISBN returned by the routine above into GetNormalizedISBN to save another lookup TO test: 1 - Enable AmazonCoverImages system preference 2 - Search staff client with a term that returns books with covers 3 - Apply patch 4 - prove -v t/db_dependent/Biblio/TransformMarcToKoha.t 5 - Confirm searching works 6 - Confirm Amazon images display (normalized_isbn is used for these) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> [EDIT] Amended, replacing a tab character. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28384 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 122419 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122419&action=edit Bug 28384: (QA follow-up) Rearranging unit tests This does two things: [1] Rearranging makes clearing the cache twice no longer needed. [2] Preparing the ground for an additional refinement in the TransformMarcToKoha routine. Test plan: Run TransformMarcToKoha.t. Should fail now for: not ok 1 - Biblio field 510a not ok 5 - Biblio field returned when "no_items" passed 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=28384 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 122420 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122420&action=edit Bug 28384: (follow-up) TransformMarcToKohaOneField should allow zeroes Until now, the test did not pass false values like '0' or ''. But we should pass '0' and not ''. Note that the test for control fields is a bit theoretical since we dont have control fields bound to Koha fields currently. The adjusted unit test in the former patch should now pass. Test plan: Run TransformMarcToKoha.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Since this change theoretically has a larger impact, I also tested the cataloguing editor, item editor. And run quite a few tests referring to AddBiblio or ModBiblio. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28384 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #0)
In C4::Search::searchResults - we ignore the item info returned, skipping processing item lines can save us time
The time savings will be absolutely minimal since this whole process runs in memory using cached values etc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28384 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122419|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=28384 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122420|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=28384 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Removed the follow-ups. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28384 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |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=28384 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.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=28384 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.11.00 |21.11.00,21.05.02 released in| | CC| |kyle@bywatersolutions.com --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Performance patch, backported to 21.05.x for 21.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28384 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 20.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org