Bug 22030

Summary: OverDrive requires configuration for field passed as username
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: OPACAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Martin Renvoize <martin.renvoize>
Severity: major    
Priority: P5 - low CC: chris, fridolin.somers, jesse, jonathan.druart, jzairo, kelly, martin.renvoize
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:
Bug Depends on: 21082    
Bug Blocks:    
Attachments: Bug 22030: Send cardnumber to overdrive instead of username
DO NOT PUSH - example of building filters for uri parameters
Bug 22030: Use preference to determine username sent to overdrive
Bug 22030: Use preference to determine username sent to overdrive
Bug 22030: Use preference to determine username sent to overdrive

Description Nick Clemens (kidclamp) 2018-12-20 02:07:11 UTC
The overdrive API wants cardnumbers, not usernames
Comment 1 Nick Clemens (kidclamp) 2018-12-20 02:12:17 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2018-12-20 22:24:14 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens (kidclamp) 2019-01-07 15:33:12 UTC Comment hidden (obsolete)
Comment 4 Nick Clemens (kidclamp) 2019-01-07 15:54:56 UTC
Created attachment 83693 [details] [review]
Bug 22030: Use preference to determine username sent to overdrive

Overdrive configuration generally defaults to cardnumber, however, they
have confirmed that some libraries use usernames. We need to allow for
both scenarios.

To test:
1 - Have an OverDrive account setup with SIP authentication
    Note: You can apply for a testing account at developer.overdrive.com
    and setup an environment
2 - Fill in all your OverDrive system preferences
3 - Test with a patron whose username is their cardnumber
4 - Confirm their overdrive account tab on opac loads
5 - Change the username to be another value like "borked_wont_work"
6 - Note the overdrive account tab won't load
7 - Apply patch, update database, not new system preference
OverDriveUsername (default to 'cardnumber)
8 - Note the OD account loads successfully
9 - Change the system preference to 'user name' - the account load fails
Comment 5 Martin Renvoize 2019-01-07 18:34:29 UTC
Created attachment 83702 [details] [review]
Bug 22030: Use preference to determine username sent to overdrive

Overdrive configuration generally defaults to cardnumber, however, they
have confirmed that some libraries use usernames. We need to allow for
both scenarios.

To test:
1 - Have an OverDrive account setup with SIP authentication
    Note: You can apply for a testing account at developer.overdrive.com
    and setup an environment
2 - Fill in all your OverDrive system preferences
3 - Test with a patron whose username is their cardnumber
4 - Confirm their overdrive account tab on opac loads
5 - Change the username to be another value like "borked_wont_work"
6 - Note the overdrive account tab won't load
7 - Apply patch, update database, not new system preference
OverDriveUsername (default to 'cardnumber)
8 - Note the OD account loads successfully
9 - Change the system preference to 'user name' - the account load fails

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2019-01-07 18:34:58 UTC
Trivia fix, no regressions.. going straight for QA here.
Comment 7 Nick Clemens (kidclamp) 2019-01-08 15:56:01 UTC
Awesome work all!

Pushed to master for 19.05
Comment 8 Martin Renvoize 2019-01-10 13:45:44 UTC
Pushed to 18.11.x for 18.11.02
Comment 9 Jesse Maseto 2019-01-11 20:19:24 UTC
Pushed to 18.05.x for 18.05.08
Comment 10 Fridolin Somers 2019-01-16 08:29:46 UTC
Depends on Bug 21082 not in 17.11.x