Bug 38735

Summary: New installations should include preferred_name in DefaultPatronSearchFields by default
Product: Koha Reporter: Emily Lamancusa (emlam) <emily.lamancusa>
Component: PatronsAssignee: Emily Lamancusa (emlam) <emily.lamancusa>
Status: Pushed to stable --- QA Contact: Katrin Fischer <katrin.fischer>
Severity: minor    
Priority: P5 - low CC: david, gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
This enhancement updates the DefaultPatronSearchFields system preference - the preferred name field is now included in the default patron search using the "standard" option. Note: This change only affects new installations. (This is related to bug 28633 - Add a preferred name field to patrons, a new featured added in Koha 24.11.00.)
Version(s) released in:
25.05.00,24.11.03
Circulation function:
Bug Depends on: 28633    
Bug Blocks:    
Attachments: Bug 38735: Add preferred_name to default search fields for new installations
Bug 38735: Add preferred_name to default search fields for new installations

Description Emily Lamancusa (emlam) 2024-12-17 21:04:00 UTC
In bug 28633, preferred_name was added to DefaultPatronSearchFields if the preference already included firstname in the selected values. This should be the case for new installations as well.
Comment 1 Emily Lamancusa (emlam) 2024-12-17 21:13:07 UTC
Created attachment 175637 [details] [review]
Bug 38735: Add preferred_name to default search fields for new installations

To test:
1. Attach patch first, and then start up KTD or sandbox to see the
   behavior for a new installation
2. Go to Administration > System Preferences and search for
    DefaultPatronSearchFields
3. Click to edit
--> Confirm preferred_name is checked in the modal that displays
4. Edit a patron to give them a preferred name that is different from
   their first name
5. Search for the patron by the newly set preferred_name
--> Confirm the patron correctly autocompletes and appears in the search
    results
Comment 2 David Nind 2024-12-18 20:44:52 UTC
Created attachment 175676 [details] [review]
Bug 38735: Add preferred_name to default search fields for new installations

To test:
1. Attach patch first, and then start up KTD or sandbox to see the
   behavior for a new installation
2. Go to Administration > System Preferences and search for
    DefaultPatronSearchFields
3. Click to edit
--> Confirm preferred_name is checked in the modal that displays
4. Edit a patron to give them a preferred name that is different from
   their first name
5. Search for the patron by the newly set preferred_name
--> Confirm the patron correctly autocompletes and appears in the search
    results

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2024-12-18 20:53:55 UTC
Something I noticed was that if you did a "Contains" search, the autocomplete doesn't pickup words contained in the preferred name.

For example, change the preferred name for Mary Burton to MaryMaryQuiteContrary - autocomplete will work with marymary but not if you start type quite.

I don't think this is related to this bug.
Comment 4 Katrin Fischer 2024-12-27 16:09:59 UTC
QA by RM.

Updated to bug fix!
Comment 5 Katrin Fischer 2024-12-27 16:36:50 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 6 Paul Derscheid 2025-03-19 23:01:40 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.03