Bug 10879

Summary: OverDrive should check for OverDriveLibraryID before performing search
Product: Koha Reporter: Owen Leonard <oleonard>
Component: SearchingAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, katrin.fischer, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.03, 19.05.08
Attachments: Bug 10879: OverDrive should check for OverDriveLibraryID before performing search
Bug 10879: OverDrive should check for OverDriveLibraryID before performing search
Bug 10879: OverDrive should check for OverDriveLibraryID before performing search

Description Owen Leonard 2013-09-12 18:47:41 UTC
The OverDrive collection search considers the option to be enabled if both OverDriveClientKey and OverDriveClientSecret are populated in system preferences. I think the check should also include OverDriveLibraryID since the search will fail without it.
Comment 1 Owen Leonard 2019-11-19 17:19:32 UTC Comment hidden (obsolete)
Comment 2 Lucas Gass 2020-01-31 00:05:01 UTC
Created attachment 98191 [details] [review]
Bug 10879: OverDrive should check for OverDriveLibraryID before performing search

This patch modifies the OPAC search results template to check for three
populated system preferences before performing an OverDrive search:
OverDriveLibraryID, OverDriveClientKey, and OverDriveClientSecret.
Previously OverDriveLibraryID was not checked, but without it the
interface reports an error performing the search.

To test you must have credentials for the OverDrive API as defined
in OverDriveClientKey, OverDriveClientSecret, and OverDriveLibraryID
system preferences.

 - With OverDriveLibraryID defined, the catalog search results page in
   the OPAC should show a link to results in the library's OverDrive
   collection.

 - With no value in the OverDriveLibraryID preference the catalog
   search page should not show any message about an OverDrive
   collection.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Katrin Fischer 2020-02-04 07:16:34 UTC
Created attachment 98363 [details] [review]
Bug 10879: OverDrive should check for OverDriveLibraryID before performing search

This patch modifies the OPAC search results template to check for three
populated system preferences before performing an OverDrive search:
OverDriveLibraryID, OverDriveClientKey, and OverDriveClientSecret.
Previously OverDriveLibraryID was not checked, but without it the
interface reports an error performing the search.

To test you must have credentials for the OverDrive API as defined
in OverDriveClientKey, OverDriveClientSecret, and OverDriveLibraryID
system preferences.

 - With OverDriveLibraryID defined, the catalog search results page in
   the OPAC should show a link to results in the library's OverDrive
   collection.

 - With no value in the OverDriveLibraryID preference the catalog
   search page should not show any message about an OverDrive
   collection.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2020-02-04 07:17:24 UTC
Trusting Owen and Lucas to have tested with OverDrive - small template change, reads well, should have no side effects.
Comment 5 Martin Renvoize 2020-02-04 10:22:05 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-02-11 00:10:03 UTC
Pushed to 19.11.x branch for 19.11.03
Comment 7 Lucas Gass 2020-02-14 21:27:34 UTC
backported to 19.05.x for 19.05.08