Bug 21246 - Extend the 'Last patron' navigation feature to 'Last X patrons'
Summary: Extend the 'Last patron' navigation feature to 'Last X patrons'
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Kyle M Hall (khall)
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 20312
Blocks: 36382 35037
  Show dependency treegraph
 
Reported: 2018-08-18 07:39 UTC by Martin Renvoize (ashimema)
Modified: 2024-04-30 12:47 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/782
Text to go in the release notes:
**Sponsored by** *ByWater Solutions*
Version(s) released in:
23.11.00
Circulation function:


Attachments
Bug 21246: Extend the 'Last patron' navigation feature to 'Last 10 patrons' (6.90 KB, patch)
2023-06-30 12:27 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 21246: Extend the 'Last patron' navigation feature to 'Last 10 patrons' (6.94 KB, patch)
2023-07-03 14:33 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 21246: Extend the 'Last patron' navigation feature to 'Last 10 patrons' (6.94 KB, patch)
2023-07-24 16:38 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 21246: (QA follow-up) Remove debugging statement (989 bytes, patch)
2023-07-24 16:38 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 21246: (QA follow-up) Add new syspref to control how many previous patrons are displayed (4.89 KB, patch)
2023-07-24 16:38 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 21246: Extend the 'Last patron' navigation feature to 'Last 10 patrons' (6.94 KB, patch)
2023-07-28 09:18 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21246: (QA follow-up) Remove debugging statement (989 bytes, patch)
2023-07-28 09:18 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21246: (QA follow-up) Add new syspref to control how many previous patrons are displayed (5.06 KB, patch)
2023-07-28 09:18 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21246: Set ShowLastPatronCount to 1 on update (1.28 KB, patch)
2023-07-28 09:19 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2018-08-18 07:39:22 UTC
A proposed enhancement during QA of bug 20312 was to expand it's functionality to become a short last of the last X patrons rather than just the last 1 patron.
Comment 1 Kyle M Hall (khall) 2023-06-30 12:27:16 UTC
Created attachment 152902 [details] [review]
Bug 21246: Extend the 'Last patron' navigation feature to 'Last 10 patrons'

This retains the "last patron" link, but extends it to add a dropdown
containg the last 10 patrons.

A future enhancement to control how many patrons to retain would
complement this well.

1) Enable showLastPatron
2) Visit two patrons details pages
3) Note "Last patron" link displays and links to the last visited patron
4) Log out
5) Apply this patch
6) Log in
7) Visit the patron details page for a few patrons
8) Note the "Last patron" link behaves as is did previously
9) Note the split button has a pulldown with the other previous patrons
10) Verify that only the last 10 patrons are retained in the pulldown
11) Verify that if you visit a patron who is already in the list
    they get moved to the top of the list
Comment 2 Sam Lau 2023-07-03 14:33:53 UTC
Created attachment 152980 [details] [review]
Bug 21246: Extend the 'Last patron' navigation feature to 'Last 10 patrons'

This retains the "last patron" link, but extends it to add a dropdown
containg the last 10 patrons.

A future enhancement to control how many patrons to retain would
complement this well.

1) Enable showLastPatron
2) Visit two patrons details pages
3) Note "Last patron" link displays and links to the last visited patron
4) Log out
5) Apply this patch
6) Log in
7) Visit the patron details page for a few patrons
8) Note the "Last patron" link behaves as is did previously
9) Note the split button has a pulldown with the other previous patrons
10) Verify that only the last 10 patrons are retained in the pulldown
11) Verify that if you visit a patron who is already in the list
    they get moved to the top of the list

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 3 Katrin Fischer 2023-07-21 14:18:47 UTC
Testing here:

1) Debugging statement

+    console.log("HIDDEN BORROWER: " + $("#hiddenborrowernumber").val() );

Looks like a left over debugging statement?


2) Data privacy / functionality concerns

I remember when this patch was added there was some dicussion about showing more or less patrons. What I would really like is if we could change the showLastPatron preference from on/off into a pref for configuring the number of patrons to show in the list instead of hardcoding 10. Or have a new pref if that works better?


Overall this works very nicely and I'd love to see this!
Comment 4 Kyle M Hall (khall) 2023-07-24 16:38:17 UTC
Created attachment 153849 [details] [review]
Bug 21246: Extend the 'Last patron' navigation feature to 'Last 10 patrons'

This retains the "last patron" link, but extends it to add a dropdown
containg the last 10 patrons.

A future enhancement to control how many patrons to retain would
complement this well.

1) Enable showLastPatron
2) Visit two patrons details pages
3) Note "Last patron" link displays and links to the last visited patron
4) Log out
5) Apply this patch
6) Log in
7) Visit the patron details page for a few patrons
8) Note the "Last patron" link behaves as is did previously
9) Note the split button has a pulldown with the other previous patrons
10) Verify that only the last 10 patrons are retained in the pulldown
11) Verify that if you visit a patron who is already in the list
    they get moved to the top of the list

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 5 Kyle M Hall (khall) 2023-07-24 16:38:23 UTC
Created attachment 153850 [details] [review]
Bug 21246: (QA follow-up) Remove debugging statement
Comment 6 Kyle M Hall (khall) 2023-07-24 16:38:25 UTC
Created attachment 153851 [details] [review]
Bug 21246: (QA follow-up) Add new syspref to control how many previous patrons are displayed
Comment 7 Katrin Fischer 2023-07-28 09:18:53 UTC
Created attachment 154011 [details] [review]
Bug 21246: Extend the 'Last patron' navigation feature to 'Last 10 patrons'

This retains the "last patron" link, but extends it to add a dropdown
containg the last 10 patrons.

A future enhancement to control how many patrons to retain would
complement this well.

1) Enable showLastPatron
2) Visit two patrons details pages
3) Note "Last patron" link displays and links to the last visited patron
4) Log out
5) Apply this patch
6) Log in
7) Visit the patron details page for a few patrons
8) Note the "Last patron" link behaves as is did previously
9) Note the split button has a pulldown with the other previous patrons
10) Verify that only the last 10 patrons are retained in the pulldown
11) Verify that if you visit a patron who is already in the list
    they get moved to the top of the list

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 8 Katrin Fischer 2023-07-28 09:18:56 UTC
Created attachment 154012 [details] [review]
Bug 21246: (QA follow-up) Remove debugging statement
Comment 9 Katrin Fischer 2023-07-28 09:18:58 UTC
Created attachment 154013 [details] [review]
Bug 21246: (QA follow-up) Add new syspref to control how many previous patrons are displayed

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Tidied the atomicupdate file.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 10 Katrin Fischer 2023-07-28 09:19:01 UTC
Created attachment 154014 [details] [review]
Bug 21246: Set ShowLastPatronCount to 1 on update

Setting the new preference to 1 will allow us to keep the
current behaviour on update. The library can then actively
decide to increase the number to whatever they prefer.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 11 Tomás Cohen Arazi (tcohen) 2023-10-11 13:33:58 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 12 Fridolin Somers 2023-10-12 21:04:17 UTC
Enhancement not pushed to 23.05.x