Bug 19524

Summary: Share patron lists between staff
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: PatronsAssignee: Jesse Maseto <jesse>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: george, gmcharlt, indradg, jonathan.druart, kyle.m.hall, m.de.rooy, martin.renvoize, nick, sandboxes
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:
Circulation function:
Bug Depends on:    
Bug Blocks: 21129    
Attachments: Bug 19524: Update database
Bug 19524: Share patron lists between staff
Bug 19524: Update Schema files
Bug 19524: Update database
Bug 19524: Share patron lists between staff
Bug 19524: Update Schema files
Bug 19524: Update database
Bug 19524: Share patron lists between staff
Bug 19524: Update Schema files
Bug 19524: Use existing logged_in_user variable

Description Kyle M Hall (khall) 2017-10-24 15:25:40 UTC
Some libraries would like to allow arbitrary lists to be used by all librarians with the 'manage_patron_lists' permission.
Comment 1 Kyle M Hall (khall) 2018-06-07 13:09:23 UTC
Created attachment 75872 [details] [review]
Bug 19524: Update database
Comment 2 Kyle M Hall (khall) 2018-06-07 13:09:29 UTC
Created attachment 75873 [details] [review]
Bug 19524: Share patron lists between staff

Some libraries would like to allow arbitrary lists to be used by all
librarians with the 'manage_patron_lists' permission.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Create or find two patrons with the manage_patron_lists permission
4) Using the first patron, create two new lists, mark one of them as
   shared
5) Log in as the second patron, browse to the patron lists page
6) Note the second patron can view, add and remove patrons from
   the shared list owned by the first patron
Comment 3 Kyle M Hall (khall) 2018-06-07 13:09:32 UTC
Created attachment 75874 [details] [review]
Bug 19524: Update Schema files
Comment 4 Biblibre Sandboxes 2018-06-07 13:50:11 UTC
Patch tested with a sandbox, by George Williams <george@nekls.org>
Comment 5 Biblibre Sandboxes 2018-06-07 13:50:52 UTC
Created attachment 75878 [details] [review]
Bug 19524: Update database

Signed-off-by: George Williams <george@nekls.org>
Comment 6 Biblibre Sandboxes 2018-06-07 13:50:56 UTC
Created attachment 75879 [details] [review]
Bug 19524: Share patron lists between staff

Some libraries would like to allow arbitrary lists to be used by all
librarians with the 'manage_patron_lists' permission.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Create or find two patrons with the manage_patron_lists permission
4) Using the first patron, create two new lists, mark one of them as
   shared
5) Log in as the second patron, browse to the patron lists page
6) Note the second patron can view, add and remove patrons from
   the shared list owned by the first patron

Signed-off-by: George Williams <george@nekls.org>
Comment 7 Biblibre Sandboxes 2018-06-07 13:50:59 UTC
Created attachment 75880 [details] [review]
Bug 19524: Update Schema files

Signed-off-by: George Williams <george@nekls.org>
Comment 8 Marcel de Rooy 2018-06-08 06:25:03 UTC
Created attachment 75891 [details] [review]
Bug 19524: Update database

Signed-off-by: George Williams <george@nekls.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2018-06-08 06:25:08 UTC
Created attachment 75892 [details] [review]
Bug 19524: Share patron lists between staff

Some libraries would like to allow arbitrary lists to be used by all
librarians with the 'manage_patron_lists' permission.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Create or find two patrons with the manage_patron_lists permission
4) Using the first patron, create two new lists, mark one of them as
   shared
5) Log in as the second patron, browse to the patron lists page
6) Note the second patron can view, add and remove patrons from
   the shared list owned by the first patron

Signed-off-by: George Williams <george@nekls.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2018-06-08 06:25:13 UTC
Created attachment 75893 [details] [review]
Bug 19524: Update Schema files

Signed-off-by: George Williams <george@nekls.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Jonathan Druart 2018-07-12 18:55:08 UTC
+    logged_in_user => $loggedinuser,

You should not do that, a Koha::Patron object is already passed using this variable name in C4::Auth
Comment 12 Kyle M Hall (khall) 2018-07-16 11:55:49 UTC
Created attachment 76992 [details] [review]
Bug 19524: Use existing logged_in_user variable
Comment 13 Nick Clemens (kidclamp) 2018-07-18 19:17:41 UTC
Awesome work all!

Pushed to master for 18.11
Comment 14 Martin Renvoize (ashimema) 2018-08-02 12:01:06 UTC
Enhancement, not backporting to 18.05.x series.
Comment 15 Katrin Fischer 2018-09-24 05:35:12 UTC
This reads like quite a behavior chance - moving things from being private to be shared. Would be good to have some text for the release notes.
Comment 16 Katrin Fischer 2018-09-24 05:35:54 UTC
Hm, there is a new field 'shared', but it's not mentioned in the test plan?
Comment 17 Katrin Fischer 2019-02-18 16:18:13 UTC
(In reply to Katrin Fischer from comment #15)
> This reads like quite a behavior chance - moving things from being private
> to be shared. Would be good to have some text for the release notes.

I have since tested this. As "Shared" is an opt-in on any list, this works well.