Bug 20057

Summary: Auto-approve option for borrower modifications
Product: Koha Reporter: Stefan Berndtsson <stefan.berndtsson>
Component: PatronsAssignee: David Gustafsson <glasklas>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: andreas.hedstrom.mace, caroline.cyr-la-rose, glasklas, gmcharlt, jonathan.druart, katrin.fischer, kyle.m.hall, lucas
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34979
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Adds a new system preference AutoApprovePatronProfileSettings that allows to automatically approve any requests for patron detail modifications made by patrons from the OPAC.
Version(s) released in:
20.11.00
Attachments: Syspref for auto approval of patron profile changes
Bug 20057 - Syspref for auto approval of patron profile changes
Bug 20057 - followup - add text for auto accepted changes
Bug 20057 - followup - add text for auto accepted changes
Bug 20057 - Syspref for auto approval of patron profile changes
Bug 20057 - followup - add text for auto accepted changes
Bug 20057 - followup - add text for auto accepted changes
Bug 20057: System preference for auto approval of patron profile changes
Bug 20057: (follow-up) Add text for auto accepted changes
Bug 20057: Fix capitalization and rephrase system preference as a sentence
Bug 20057: System preference for auto approval of patron profile changes
Bug 20057: (follow-up) Add text for auto accepted changes
Bug 20057: Fix capitalization and rephrase system preference as a sentence

Description Stefan Berndtsson 2018-01-22 11:40:33 UTC
We (Gothenburg University) allow patrons to change their own personal details at will. The need for either email verification (not everyone has a registered email address) or staff approval is an unnecessary obstacle.

Here is a request (and code) for automatic approval of detail changes.
Comment 1 Stefan Berndtsson 2018-01-22 11:41:09 UTC
Created attachment 70790 [details] [review]
Syspref for auto approval of patron profile changes
Comment 2 Stefan Berndtsson 2018-01-23 11:59:01 UTC
Testplan for this patch:

1. Apply patch.
2. Make sure syspref "PatronSelfRegistrationVerifyByEmail" is set to "Don't require".
3. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.
Comment 3 Liz Rea 2018-01-26 01:45:46 UTC
Created attachment 70925 [details] [review]
Bug 20057 - Syspref for auto approval of patron profile changes

Testplan for this patch:

1. Apply patch.
2. Make sure syspref "PatronSelfRegistrationVerifyByEmail" is set to "Don't require".
3. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
This works, we may want some different text for this situation in the OPAC, it still says the librarian has to approve the change.
Comment 4 Liz Rea 2018-01-26 01:45:54 UTC
Created attachment 70926 [details]
Bug 20057 - followup - add text for auto accepted changes

1. Apply patch.
2. Make sure syspref "PatronSelfRegistrationVerifyByEmail" is set to "Don't require".
3. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
-> 4a. Text for patron says that changes are pending acceptance by the library
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.
-> 7a. Text for patron says that changes have been submitted and accepted by the library.
Comment 5 Liz Rea 2018-01-26 01:51:18 UTC
Created attachment 70927 [details] [review]
Bug 20057 - followup - add text for auto accepted changes

1. Apply patch.
2. Make sure syspref "PatronSelfRegistrationVerifyByEmail" is set to "Don't require".
3. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
-> 4a. Text for patron says that changes are pending acceptance by the library
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.
-> 7a. Text for patron says that changes have been submitted and accepted by the library.
Comment 6 Andreas Hedström Mace 2018-02-19 20:04:45 UTC
Looking at the earlier comments, shouldn't this bug have the status Signed off?
Comment 7 Katrin Fischer 2018-03-30 14:04:31 UTC
This needs a rebase - changing status to reflect.
Comment 8 David Gustafsson 2020-05-19 10:52:36 UTC
Created attachment 105075 [details] [review]
Bug 20057 - Syspref for auto approval of patron profile changes

Testplan for this patch:

1. Apply patch.
2. Make sure syspref "PatronSelfRegistrationVerifyByEmail" is set to "Don't require".
3. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
This works, we may want some different text for this situation in the OPAC, it still says the librarian has to approve the change.
Comment 9 David Gustafsson 2020-05-19 10:52:39 UTC
Created attachment 105076 [details] [review]
Bug 20057 - followup - add text for auto accepted changes

1. Apply patch.
2. Make sure syspref "PatronSelfRegistrationVerifyByEmail" is set to "Don't require".
3. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
-> 4a. Text for patron says that changes are pending acceptance by the library
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.
-> 7a. Text for patron says that changes have been submitted and accepted by the library.
Comment 10 Katrin Fischer 2020-05-19 21:23:14 UTC
Hi David, can you explain PatronSelfRegistrationVerifyByEmail in your test plan? This should only be valid for registrations, not for changes. So I think in your plan it should probably work with either setting of the pref?
Comment 11 David Gustafsson 2020-05-20 11:14:45 UTC
Created attachment 105142 [details] [review]
Bug 20057 - followup - add text for auto accepted changes

1. Apply patch.
2. Make sure syspref "PatronSelfRegistrationVerifyByEmail" is set to "Don't require".
3. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
-> 4a. Text for patron says that changes are pending acceptance by the library
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.
-> 7a. Text for patron says that changes have been submitted and accepted by the library.
Comment 12 David Gustafsson 2020-05-20 11:16:39 UTC
@Katrin Fischer. Sorry, just rebased, had some real nasty issues with git bz/am and the fastest way to get around them was to reconstruct the commits manually and forgot to change the author of the last commit. So I'm not the author of that one.
Comment 13 David Gustafsson 2020-05-20 11:17:18 UTC
(Have now corrected the commit author).
Comment 14 David Gustafsson 2020-05-20 11:20:19 UTC
So regarding your question I'm not at all familiar with this patch and cannot give a direct answer. I can perhaps get back to it later, but right now don't have time to figure this out.
Comment 15 Katrin Fischer 2020-05-23 14:49:46 UTC
Created attachment 105303 [details] [review]
Bug 20057: System preference for auto approval of patron profile changes

Testplan for this patch:

1. Apply patch.
2. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via OPAC interface again.
7. Expect modifications to have been approved automatically.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
This works, we may want some different text for this situation in the OPAC, it still says the librarian has to approve the change.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2020-05-23 14:49:50 UTC
Created attachment 105304 [details] [review]
Bug 20057: (follow-up) Add text for auto accepted changes

1. Apply patch.
2. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
-> 4a. Text for patron says that changes are pending acceptance by the library
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.
-> 7a. Text for patron says that changes have been submitted and accepted by the library.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2020-05-23 14:49:54 UTC
Created attachment 105305 [details] [review]
Bug 20057: Fix capitalization and rephrase system preference as a sentence

This makes changes to strings involved in this feature:
- Rephrases the system preference description into a sentence
- Rephrases message shown in OPAC on submitting (library has not actively
  approved, so just say that the record has been modified)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2020-05-23 14:52:12 UTC
I've fixed up the patches to apply to standards (capitalization and commit messages). I can't make out why PatronSelfRegistrationVerifyByEmail should be relevant here, so I have removed it from the commit messages. I've also tested the workflow for self registrations.

Please QA team, can you double check this? We use opac-memberentry.pl for a few too many things.
Comment 19 Jonathan Druart 2020-08-17 15:19:52 UTC
(In reply to Katrin Fischer from comment #18)
> Please QA team, can you double check this? We use opac-memberentry.pl for a
> few too many things.

That seems correct to me.
Maybe we should rename the pref to match "SelfModification", like "AutoApprovePatronSelfModification"?

Idea of improvement: we could make it a list of patron's categories instead of a global switch.
Comment 20 Nick Clemens 2020-08-28 14:42:21 UTC
Created attachment 109288 [details] [review]
Bug 20057: System preference for auto approval of patron profile changes

Testplan for this patch:

1. Apply patch.
2. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via OPAC interface again.
7. Expect modifications to have been approved automatically.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
This works, we may want some different text for this situation in the OPAC, it still says the librarian has to approve the change.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 21 Nick Clemens 2020-08-28 14:42:24 UTC
Created attachment 109289 [details] [review]
Bug 20057: (follow-up) Add text for auto accepted changes

1. Apply patch.
2. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
-> 4a. Text for patron says that changes are pending acceptance by the library
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.
-> 7a. Text for patron says that changes have been submitted and accepted by the library.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 22 Nick Clemens 2020-08-28 14:42:27 UTC
Created attachment 109290 [details] [review]
Bug 20057: Fix capitalization and rephrase system preference as a sentence

This makes changes to strings involved in this feature:
- Rephrases the system preference description into a sentence
- Rephrases message shown in OPAC on submitting (library has not actively
  approved, so just say that the record has been modified)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 23 Jonathan Druart 2020-08-31 14:20:33 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 24 Lucas Gass 2020-09-04 20:26:17 UTC
enhancement will not be backported to 20.05.x