Bug 37221 - No way to turn off OverDrive integrations without removing all system preference values
Summary: No way to turn off OverDrive integrations without removing all system prefere...
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Lucas Gass (lukeg)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-28 14:49 UTC by Liz Rea
Modified: 2024-12-05 21:21 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch adds the new system preference `OPACOverDrive`. It allows a library to disable OverDrive features without having to remove one or more of their OverDrive credentials.
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 37221: Add preference to turn off OPAC Overdrive features (11.81 KB, patch)
2024-07-10 17:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37221: Add preference to turn off OPAC Overdrive features (11.88 KB, patch)
2024-07-25 16:21 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 37221: Add preference to turn off OPAC Overdrive features (11.72 KB, patch)
2024-11-05 13:46 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37221: Add preference to turn off OPAC Overdrive features (11.79 KB, patch)
2024-11-05 20:14 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Rea 2024-06-28 14:49:04 UTC
If the Overdrive API goes down, having this integration on at a busy site can cause backlogs due to timeouts that can only be mitigated by disabling the integration. As it stands to disable the integrations, you have to remove all of the values from the Overdrive preferences. It would be nice to be able to turn this integration on and off with a single syspref, retaining any previously supplied values for the overdrive integration.
Comment 1 Owen Leonard 2024-07-10 17:36:55 UTC
Created attachment 168760 [details] [review]
Bug 37221: Add preference to turn off OPAC Overdrive features

This patch adds the preference "OPACOverDrive" to control whether
OverDrive features are shown in the OPAC. This allows a library to
disable OverDrive features without having to remove one or more of their
OverDrive credentials.

The patch also adds a check for the OPACOverDrive preference in the
OverDrive search results page. If OverDrive is disabled, navigating to
that page should give a 404.

To test you will need OverDrive credentials to test with.

- Apply the patch and run updatedatabase.
  - If you already had data in the OverDriveLibraryID,
    OverDriveClientKey, and OverDriveClientSecret system preferences,
    the OPACOverDrive preference will be enabled when added. If not it
    will be disabled by default.
- Rebuild the staff interface CSS
  (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
- Go to Administration -> System preferences -> Enhanced content ->
  OverDrive.
- If necessary, enter valid credentials in the OverDriveLibraryID,
  OverDriveClientKey, and OverDriveClientSecret system preferences.
- Set OPACOverDrive to "Don't enable."

- In the OPAC perform a catalog search. Normally, if your credentials
  were correct OverDrive search results would automatically appear at
  the top of Koha's search results. Now there should be none.
- Enable the OPACOverDrive preference and repeat your search. Now
  OverDrive results should appear.
  - Confirm that the OverDrive search results page works correctly.

- Test that OverDrive circulation features are working by logging in to
  the OPAC as a user who has active OverDrive checkouts.
- Enable the OPACOverDrive and OverDriveCirculation system preferences.
- On the user's summary page there should be a tab for "OverDrive
  account."
- The tab should not appear if either OPACOverDrive or
  OverDriveCirculation is disabled.

Sponsored-by: Athens County Public Libraries
Comment 2 ByWater Sandboxes 2024-07-25 16:21:31 UTC
Created attachment 169594 [details] [review]
Bug 37221: Add preference to turn off OPAC Overdrive features

This patch adds the preference "OPACOverDrive" to control whether
OverDrive features are shown in the OPAC. This allows a library to
disable OverDrive features without having to remove one or more of their
OverDrive credentials.

The patch also adds a check for the OPACOverDrive preference in the
OverDrive search results page. If OverDrive is disabled, navigating to
that page should give a 404.

To test you will need OverDrive credentials to test with.

- Apply the patch and run updatedatabase.
  - If you already had data in the OverDriveLibraryID,
    OverDriveClientKey, and OverDriveClientSecret system preferences,
    the OPACOverDrive preference will be enabled when added. If not it
    will be disabled by default.
- Rebuild the staff interface CSS
  (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
- Go to Administration -> System preferences -> Enhanced content ->
  OverDrive.
- If necessary, enter valid credentials in the OverDriveLibraryID,
  OverDriveClientKey, and OverDriveClientSecret system preferences.
- Set OPACOverDrive to "Don't enable."

- In the OPAC perform a catalog search. Normally, if your credentials
  were correct OverDrive search results would automatically appear at
  the top of Koha's search results. Now there should be none.
- Enable the OPACOverDrive preference and repeat your search. Now
  OverDrive results should appear.
  - Confirm that the OverDrive search results page works correctly.

- Test that OverDrive circulation features are working by logging in to
  the OPAC as a user who has active OverDrive checkouts.
- Enable the OPACOverDrive and OverDriveCirculation system preferences.
- On the user's summary page there should be a tab for "OverDrive
  account."
- The tab should not appear if either OPACOverDrive or
  OverDriveCirculation is disabled.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 3 Owen Leonard 2024-11-05 13:46:42 UTC
Created attachment 173979 [details] [review]
Bug 37221: Add preference to turn off OPAC Overdrive features

This patch adds the preference "OPACOverDrive" to control whether
OverDrive features are shown in the OPAC. This allows a library to
disable OverDrive features without having to remove one or more of their
OverDrive credentials.

The patch also adds a check for the OPACOverDrive preference in the
OverDrive search results page. If OverDrive is disabled, navigating to
that page should give a 404.

To test you will need OverDrive credentials to test with.

- Apply the patch and run updatedatabase.
  - If you already had data in the OverDriveLibraryID,
    OverDriveClientKey, and OverDriveClientSecret system preferences,
    the OPACOverDrive preference will be enabled when added. If not it
    will be disabled by default.
- Rebuild the staff interface CSS
  (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
- Go to Administration -> System preferences -> Enhanced content ->
  OverDrive.
- If necessary, enter valid credentials in the OverDriveLibraryID,
  OverDriveClientKey, and OverDriveClientSecret system preferences.
- Set OPACOverDrive to "Don't enable."

- In the OPAC perform a catalog search. Normally, if your credentials
  were correct OverDrive search results would automatically appear at
  the top of Koha's search results. Now there should be none.
- Enable the OPACOverDrive preference and repeat your search. Now
  OverDrive results should appear.
  - Confirm that the OverDrive search results page works correctly.

- Test that OverDrive circulation features are working by logging in to
  the OPAC as a user who has active OverDrive checkouts.
- Enable the OPACOverDrive and OverDriveCirculation system preferences.
- On the user's summary page there should be a tab for "OverDrive
  account."
- The tab should not appear if either OPACOverDrive or
  OverDriveCirculation is disabled.

Sponsored-by: Athens County Public Libraries
Comment 4 Lucas Gass (lukeg) 2024-11-05 20:14:56 UTC
Created attachment 174036 [details] [review]
Bug 37221: Add preference to turn off OPAC Overdrive features

This patch adds the preference "OPACOverDrive" to control whether
OverDrive features are shown in the OPAC. This allows a library to
disable OverDrive features without having to remove one or more of their
OverDrive credentials.

The patch also adds a check for the OPACOverDrive preference in the
OverDrive search results page. If OverDrive is disabled, navigating to
that page should give a 404.

To test you will need OverDrive credentials to test with.

- Apply the patch and run updatedatabase.
  - If you already had data in the OverDriveLibraryID,
    OverDriveClientKey, and OverDriveClientSecret system preferences,
    the OPACOverDrive preference will be enabled when added. If not it
    will be disabled by default.
- Rebuild the staff interface CSS
  (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
- Go to Administration -> System preferences -> Enhanced content ->
  OverDrive.
- If necessary, enter valid credentials in the OverDriveLibraryID,
  OverDriveClientKey, and OverDriveClientSecret system preferences.
- Set OPACOverDrive to "Don't enable."

- In the OPAC perform a catalog search. Normally, if your credentials
  were correct OverDrive search results would automatically appear at
  the top of Koha's search results. Now there should be none.
- Enable the OPACOverDrive preference and repeat your search. Now
  OverDrive results should appear.
  - Confirm that the OverDrive search results page works correctly.

- Test that OverDrive circulation features are working by logging in to
  the OPAC as a user who has active OverDrive checkouts.
- Enable the OPACOverDrive and OverDriveCirculation system preferences.
- On the user's summary page there should be a tab for "OverDrive
  account."
- The tab should not appear if either OPACOverDrive or
  OverDriveCirculation is disabled.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 5 Lucas Gass (lukeg) 2024-11-05 20:16:22 UTC
I like seeing these big on/off switches. Everything looks good here so I am passing QA. 

Is there a reason I need to Rebuild the staff interface CSS?
Comment 6 Owen Leonard 2024-11-06 12:09:59 UTC
(In reply to Lucas Gass (lukeg) from comment #5)
> Is there a reason I need to Rebuild the staff interface CSS?

Obviously my mistake since there are no CSS changes. Perhaps I made a change which I later rejected.
Comment 7 Lucas Gass (lukeg) 2024-11-06 13:55:42 UTC
(In reply to Owen Leonard from comment #6)
> (In reply to Lucas Gass (lukeg) from comment #5)
> > Is there a reason I need to Rebuild the staff interface CSS?
> 
> Obviously my mistake since there are no CSS changes. Perhaps I made a change
> which I later rejected.

Thanks for confirming.
Comment 8 Katrin Fischer 2024-11-11 13:15:30 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 9 Lucas Gass (lukeg) 2024-12-05 21:21:14 UTC
Enhancement, no 24.05.x backport.