Bug 39576 - 'Last patron' results should display preferred name
Summary: 'Last patron' results should display preferred name
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Andrew Fuerste-Henry
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-07 17:43 UTC by Kristi
Modified: 2025-05-26 15:01 UTC (History)
6 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 39576: Show preferred_name for hiddenborrowername (1.75 KB, patch)
2025-04-08 12:36 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 39576: Show preferred_name for hiddenborrowername (1.89 KB, patch)
2025-04-15 18:02 UTC, Emmanuel Bétemps
Details | Diff | Splinter Review
Bug 39576: Show preferred_name for hiddenborrowername (1.96 KB, patch)
2025-05-12 14:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kristi 2025-04-07 17:43:49 UTC
The "Last Patron" search function lists [Last name] [first name] [card number]

With the new preferred name field, it would be nice if the last patron results showed

[last name] [preferred name] [card number]
Comment 1 Andrew Fuerste-Henry 2025-04-08 12:36:32 UTC
Created attachment 180717 [details] [review]
Bug 39576: Show preferred_name for hiddenborrowername

The last patron menu uses the value "hiddenborrowername." I've made that use preferred_name instead of firstname. When a patron's preferred_name is not manually set/edited, it automatically takes the value of firstname, so we don't need an IF in the template toolkit here.

To test:
1 - have a patron with a preferred_name and one without
2 - get both patrons in the Last Patron dropdown, confirm they both show firstname
3 - apply patch, restart services, clear cache, reload page
4 - get your patrons in Last Patron again, confirm now one shows preferred name and the other firstname
Comment 2 Emmanuel Bétemps 2025-04-15 18:02:49 UTC
Created attachment 180982 [details] [review]
Bug 39576: Show preferred_name for hiddenborrowername

The last patron menu uses the value "hiddenborrowername." I've made that use preferred_name instead of firstname. When a patron's preferred_name is not manually set/edited, it automatically takes the value of firstname, so we don't need an IF in the template toolkit here.

To test:
1 - have a patron with a preferred_name and one without
2 - get both patrons in the Last Patron dropdown, confirm they both show firstname
3 - apply patch, restart services, clear cache, reload page
4 - get your patrons in Last Patron again, confirm now one shows preferred name and the other firstname

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Comment 3 Kristi 2025-04-15 18:04:45 UTC
Thanks for signing off, Emmanuel. I am putting this in signed off status.
Comment 4 Emmanuel Bétemps 2025-04-15 18:06:44 UTC
Hi,

you're welcome !
(the hardest thing was to find how displaying the last patron dropdown... thanks to the manual ^^)

Manu.
Comment 5 Martin Renvoize (ashimema) 2025-05-12 14:06:09 UTC
Created attachment 182281 [details] [review]
Bug 39576: Show preferred_name for hiddenborrowername

The last patron menu uses the value "hiddenborrowername." I've made that use preferred_name instead of firstname. When a patron's preferred_name is not manually set/edited, it automatically takes the value of firstname, so we don't need an IF in the template toolkit here.

To test:
1 - have a patron with a preferred_name and one without
2 - get both patrons in the Last Patron dropdown, confirm they both show firstname
3 - apply patch, restart services, clear cache, reload page
4 - get your patrons in Last Patron again, confirm now one shows preferred name and the other firstname

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 6 Katrin Fischer 2025-05-12 16:32:21 UTC
Pushed for 25.05!

Well done everyone, thank you!