Bug 23623

Summary: Use the new API and remove /svc scripts for privacy settings
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Circulation function:
Bug Depends on: 20691, 23584    
Bug Blocks:    
Attachments: Bug 23623: Use the new API for changing privacy settings (guarantors)
Bug 23623: Remove the svc/patron/show* scripts
Bug 23623: Use the new API for changing privacy settings (guarantors)
Bug 23623: Remove the svc/patron/show* scripts
Bug 23623: (follow-up) Add missing comma in ajax call definition
Bug 23623: (follow-up) Add missing filters
Bug 23623: Use the new API for changing privacy settings (guarantors)
Bug 23623: Remove the svc/patron/show* scripts
Bug 23623: (follow-up) Add missing comma in ajax call definition
Bug 23623: (follow-up) Add missing filters

Description Tomás Cohen Arazi (tcohen) 2019-09-16 18:12:44 UTC

    
Comment 1 Tomás Cohen Arazi (tcohen) 2019-09-16 19:04:57 UTC
Created attachment 92842 [details] [review]
Bug 23623: Use the new API for changing privacy settings (guarantors)

This patchset makes opac-memberentry.pl use the API instead of the old
svc scripts for ajax calls, for setting privacy configuration in the
OPAC.

To test:
1) Disable OPACPrivacy
2) Enable AllowPatronToSetCheckoutsVisibilityForGuarantor
3) Enable AllowPatronToSetFinesVisibilityForGuarantor
4) Have a known patron be the guarantee of someone (so things display)
5) Log into the OPAC, go to the 'your personal details' tab
6) Change 'Allow your guarantor to view your current checkouts?' and
click the 'Update' button.
=> SUCCESS: Operation succeeds
7) Reload the tab
=> SUCCESS: The page reflects the expected changes (i.e. the API did it
        right)
8) Repeat 6 and 7 with the 'Allow your guarantor to view your current
fines?' option
=> SUCCESS: It works as well
- Sign off :-D
Comment 2 Tomás Cohen Arazi (tcohen) 2019-09-16 19:05:00 UTC
Created attachment 92843 [details] [review]
Bug 23623: Remove the svc/patron/show* scripts
Comment 3 Josef Moravec 2019-09-17 19:04:06 UTC
Created attachment 92914 [details] [review]
Bug 23623: Use the new API for changing privacy settings (guarantors)

This patchset makes opac-memberentry.pl use the API instead of the old
svc scripts for ajax calls, for setting privacy configuration in the
OPAC.

To test:
1) Disable OPACPrivacy
2) Enable AllowPatronToSetCheckoutsVisibilityForGuarantor
3) Enable AllowPatronToSetFinesVisibilityForGuarantor
4) Have a known patron be the guarantee of someone (so things display)
5) Log into the OPAC, go to the 'your personal details' tab
6) Change 'Allow your guarantor to view your current checkouts?' and
click the 'Update' button.
=> SUCCESS: Operation succeeds
7) Reload the tab
=> SUCCESS: The page reflects the expected changes (i.e. the API did it
        right)
8) Repeat 6 and 7 with the 'Allow your guarantor to view your current
fines?' option
=> SUCCESS: It works as well
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Josef Moravec 2019-09-17 19:04:11 UTC
Created attachment 92915 [details] [review]
Bug 23623: Remove the svc/patron/show* scripts

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Josef Moravec 2019-09-17 19:04:15 UTC
Created attachment 92916 [details] [review]
Bug 23623: (follow-up) Add missing comma in ajax call definition

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Josef Moravec 2019-09-17 19:04:20 UTC
Created attachment 92917 [details] [review]
Bug 23623: (follow-up) Add missing filters

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Kyle M Hall (khall) 2019-09-20 15:09:07 UTC
Created attachment 93001 [details] [review]
Bug 23623: Use the new API for changing privacy settings (guarantors)

This patchset makes opac-memberentry.pl use the API instead of the old
svc scripts for ajax calls, for setting privacy configuration in the
OPAC.

To test:
1) Disable OPACPrivacy
2) Enable AllowPatronToSetCheckoutsVisibilityForGuarantor
3) Enable AllowPatronToSetFinesVisibilityForGuarantor
4) Have a known patron be the guarantee of someone (so things display)
5) Log into the OPAC, go to the 'your personal details' tab
6) Change 'Allow your guarantor to view your current checkouts?' and
click the 'Update' button.
=> SUCCESS: Operation succeeds
7) Reload the tab
=> SUCCESS: The page reflects the expected changes (i.e. the API did it
        right)
8) Repeat 6 and 7 with the 'Allow your guarantor to view your current
fines?' option
=> SUCCESS: It works as well
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall (khall) 2019-09-20 15:09:49 UTC
Created attachment 93002 [details] [review]
Bug 23623: Remove the svc/patron/show* scripts

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Kyle M Hall (khall) 2019-09-20 15:10:09 UTC
Created attachment 93003 [details] [review]
Bug 23623: (follow-up) Add missing comma in ajax call definition

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Kyle M Hall (khall) 2019-09-20 15:10:27 UTC
Created attachment 93004 [details] [review]
Bug 23623: (follow-up) Add missing filters

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Martin Renvoize (ashimema) 2019-09-23 10:10:10 UTC
Nice work!

Pushed to master for 19.11.00
Comment 12 Marcel de Rooy 2019-10-04 09:33:44 UTC
First use of the REST API in an opac script/template ?