Bug 38734

Summary: Default notice templates should use preferred_name
Product: Koha Reporter: Emily Lamancusa (emlam) <emily.lamancusa>
Component: NoticesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: lisette
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 28633    
Bug Blocks:    

Description Emily Lamancusa (emlam) 2024-12-17 20:55:28 UTC
Default notice templates should be updated to use the preferred_name field, since that field was designed to override the first name (or stay identical to the first name if the field is hidden everywhere).
Comment 1 Lisette Scheer 2024-12-17 21:14:33 UTC
https://github.com/Koha-Community/Koha/blob/main/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc 

 - "[% INCLUDE 'patron-title.inc' patron => borrower, no_title => 1, no_cardnumber => 1, no_html = 1 %],"

That checks for preferred name/other name and works in notices and is less code than coding it directly in each notice.
Comment 2 Emily Lamancusa (emlam) 2024-12-17 21:19:17 UTC
Oh yeah, I forgot that works in notices. Thanks for the reminder!

I do worry that it makes the notice templates more confusing for library staff who may want to edit the notices themselves, though... (Definitely not within the scope of this bug, but maybe we should add a modal to insert the configured include into the notice, like we do with runtime parameters in reports.)