Bug 9726

Summary: XISBN service throttle not initialized
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: Staff interfaceAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P5 - low CC: chris, gmcharlt
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed patch
[SIGNED-OFF] Bug 9726: XISBN service throttle not initialized
[PASSED QA] Bug 9726: XISBN service throttle not initialized

Description Fridolin Somers 2013-02-28 09:03:37 UTC
For limiting XISBN API use, XISBNDailyLimit syspref is used to compare with daily use count of the API. This count is stored in services_throttle table.
But this table content is never initialized, not in installer nor in updatedatabase. So count is never increased and API is used without limit.
Comment 1 Fridolin Somers 2013-02-28 09:18:38 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2013-03-19 17:04:31 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2013-03-30 22:31:34 UTC
Created attachment 17063 [details] [review]
[PASSED QA] Bug 9726: XISBN service throttle not initialized

For limiting XISBN API use, XISBNDailyLimit syspref is used to compare
with daily use count of the API. This count is stored in
services_throttle table. But this table content is never initialized,
not in installer nor in updatedatabase. So count is never increased and
API is used without limit.

This patch add an insert of service type in services_throttle if not
existing. So service throttle will be initialized.

Test plan :
- Check that you don't have a line in services_throttle for
  service_type=xisbn
- Activate FRBRizeEditions and XISBN sysprefs
- Set a small number in XISBNDailyLimit (ie 5)
- Go to a biblio page (with ISBN)
- Look at services_throttle table
  => you should have a line for service_type=xisbn with service_count=1.
- Refresh biblio page untill limit is reached
  => service_count should be equal to limit for service_type=xisbn

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Passes test plan correctly.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Fixes problem, tested according to test plan.
Comment 4 Jared Camins-Esakov 2013-03-31 02:05:51 UTC
This patch has been pushed to master.
Comment 5 Chris Cormack 2013-03-31 06:40:49 UTC
Pushed to 3.10.x and 3.8.x will be in 3.10.5 and 3.8.12