[Bug 28375] New: Inefficiencies in fetching COinS
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 Bug ID: 28375 Summary: Inefficiencies in fetching COinS Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org In XSLTParseForDisplay we fetch the coins for the OPAC even on the staff interface On opac results we fetch the biblio object, this is already fetched in the searchResults subroutine Additionally - we can fetch the coins in the searchResults to move logic out of the scripts -- 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=28375 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=28375 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121123 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121123&action=edit Bug 28375: Inefficiencies in fetching COinS This patchset adds an 'interface' parameter to XSLTParseForDisplay to avoid fetching coins when not needed Additionally we move some logic from the scripts to searchResults to avoid an extra fetch fo the biblio object To test: 1 - Enable COinSinOPACResults syspref 2 - Also enable OPACShowOpenURL and OPACOpenURLItemTypes - adding an itemtype that you can find 3 - Perform a search on the OPAC and confirm coins are included and openurl shown 4 - Perform a search on staff client and confirm openurls do not show 5 - Apply patch 6 - Results should be the same -- 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=28375 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121123|0 |1 is obsolete| | --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 121124 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121124&action=edit Bug 28375: Inefficiencies in fetching COinS This patchset adds an 'interface' parameter to XSLTParseForDisplay to avoid fetching coins when not needed Additionally we move some logic from the scripts to searchResults to avoid an extra fetch fo the biblio object To test: 1 - Enable COinSinOPACResults syspref 2 - Also enable OPACShowOpenURL and OPACOpenURLItemTypes - adding an itemtype that you can find 3 - Perform a search on the OPAC and confirm coins are included and openurl shown 4 - Perform a search on staff client and confirm openurls do not show 5 - Apply patch 6 - Results should be the same -- 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=28375 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=28375 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Needs Signoff |Patch doesn't apply --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- The code looks great and simple. But it doesn't apply. Please resubmit. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 Nick Clemens <nick@bywatersolutions.com> 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=28375 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121124|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 127582 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127582&action=edit Bug 28375: Inefficiencies in fetching COinS This patchset adds an 'interface' parameter to XSLTParseForDisplay to avoid fetching coins when not needed Additionally we move some logic from the scripts to searchResults to avoid an extra fetch fo the biblio object To test: 1 - Enable COinSinOPACResults syspref 2 - Also enable OPACShowOpenURL and OPACOpenURLItemTypes - adding an itemtype that you can find 3 - Perform a search on the OPAC and confirm coins are included and openurl shown 4 - Perform a search on staff client and confirm openurls do not show 5 - Apply patch 6 - Results should be the same -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- I get this error: Could not compile /kohadevbox/koha/opac/opac-search.pl: Global symbol "$oldbiblio_object" requires explicit package name (did you forget to declare "my $oldbiblio_object"?) at /kohadevbox/koha/C4/Search.pm line 2006. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 Nick Clemens <nick@bywatersolutions.com> 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=28375 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127582|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 140955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140955&action=edit Bug 28375: Inefficiencies in fetching COinS This patchset adds an 'interface' parameter to XSLTParseForDisplay to avoid fetching coins when not needed Additionally we move some logic from the scripts to searchResults to avoid an extra fetch fo the biblio object To test: 1 - Enable COinSinOPACResults syspref 2 - Also enable OPACShowOpenURL and OPACOpenURLItemTypes - adding an itemtype that you can find 3 - Perform a search on the OPAC and confirm coins are included and openurl shown 4 - Perform a search on staff client and confirm openurls do not show 5 - Apply patch 6 - Results should be the same -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 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=28375 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140955|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 141051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141051&action=edit Bug 28375: Inefficiencies in fetching COinS This patchset adds an 'interface' parameter to XSLTParseForDisplay to avoid fetching coins when not needed Additionally we move some logic from the scripts to searchResults to avoid an extra fetch fo the biblio object To test: 1 - Enable COinSinOPACResults syspref 2 - Also enable OPACShowOpenURL and OPACOpenURLItemTypes - adding an itemtype that you can find 3 - Perform a search on the OPAC and confirm coins are included and openurl shown 4 - Perform a search on staff client and confirm openurls do not show 5 - Apply patch 6 - Results should be the same 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=28375 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #8 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Had to add an address to the OpenURLResolverURL system preference for the OpenURL link to display under the title in the OPAC search results. 2. The actual format of the link for OpenURL was the same in the OPAC search results both before and after the patch was applied (I compared the link for a specific item in the search results). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Lots of failures on QA tools. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 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=28375 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 141126 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141126&action=edit Bug 28375: (follow-up) Remove guessed interface parameter - always pass Previous patch added interface parameter passed on each call. There was an existing one that 'guessed' - this patch removes that Fixes missing comma -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Great. No failures anymore from qa tools. Here is another question :) @@ -179,6 +179,7 @@ sub XSLTParse4Display { my $hidden_items = $params->{hidden_items} || []; my $variables = $params->{xslt_variables}; my $items_rs = $params->{items_rs}; + my $interface = $params->{interface}; Why do you use a parameter? Did you consider using C4::Context->interface ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141051|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 141490 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141490&action=edit Bug 28375: Inefficiencies in fetching COinS This patchset adds an 'interface' parameter to XSLTParseForDisplay to avoid fetching coins when not needed Additionally we move some logic from the scripts to searchResults to avoid an extra fetch fo the biblio object To test: 1 - Enable COinSinOPACResults syspref 2 - Also enable OPACShowOpenURL and OPACOpenURLItemTypes - adding an itemtype that you can find 3 - Perform a search on the OPAC and confirm coins are included and openurl shown 4 - Perform a search on staff client and confirm openurls do not show 5 - Apply patch 6 - Results should be the same Signed-off-by: David Nind <david@davidnind.com> 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=28375 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141126|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 141491 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141491&action=edit Bug 28375: (follow-up) Remove guessed interface parameter - always pass Previous patch added interface parameter passed on each call. There was an existing one that 'guessed' - this patch removes that Fixes missing comma 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=28375 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Adding a second signoff here as I missed that Marcel had started QAing... Leaving QA to Marcel once he's had an answer to his question.. it does bare asking.. the code would appear much simple if we just use the context. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 141497 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141497&action=edit Bug 28375: (follow-up) Use C4::Context->interface -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28375 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=28375 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141490|0 |1 is obsolete| | --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 141955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141955&action=edit Bug 28375: Inefficiencies in fetching COinS This patchset adds an 'interface' parameter to XSLTParseForDisplay to avoid fetching coins when not needed Additionally we move some logic from the scripts to searchResults to avoid an extra fetch fo the biblio object To test: 1 - Enable COinSinOPACResults syspref 2 - Also enable OPACShowOpenURL and OPACOpenURLItemTypes - adding an itemtype that you can find 3 - Perform a search on the OPAC and confirm coins are included and openurl shown 4 - Perform a search on staff client and confirm openurls do not show 5 - Apply patch 6 - Results should be the same Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=28375 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141491|0 |1 is obsolete| | --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 141956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141956&action=edit Bug 28375: (follow-up) Remove guessed interface parameter - always pass Previous patch added interface parameter passed on each call. There was an existing one that 'guessed' - this patch removes that Fixes missing comma Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=28375 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141497|0 |1 is obsolete| | --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 141957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141957&action=edit Bug 28375: (follow-up) Use C4::Context->interface 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=28375 --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 141958 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141958&action=edit Bug 28375: (QA follow-up) Remove two remaining interface params No test plan: parameter is already obsolete. 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=28375 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.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=28375 --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org