Bug 10879 - OverDrive should check for OverDriveLibraryID before performing search
Summary: OverDrive should check for OverDriveLibraryID before performing search
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-12 18:47 UTC by Owen Leonard
Modified: 2020-02-14 21:27 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
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 (1.92 KB, patch)
2019-11-19 17:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 10879: OverDrive should check for OverDriveLibraryID before performing search (1.97 KB, patch)
2020-01-31 00:05 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 10879: OverDrive should check for OverDriveLibraryID before performing search (2.03 KB, patch)
2020-02-04 07:16 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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