https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42383 --- Comment #128 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 209788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209788&action=edit Bug 42383: (QA follow-up) Format patron names with $patron_to_html The check-in page built patron names by hand from surname and firstname in several places: the 'Returned by' column of the check-in table, the hold and recall patron in the confirmation modal, and the 'Hold filled for' and waiting holds alert boxes. This ignores the preferred name, middle name, other name and the 'A patron from X' fallback that the rest of the staff interface displays, and prints 'undefined' for patrons without a first name. The 'Patron #X' fallback was also not translatable. This patch (QA comment points 18 and 20) uses the global $patron_to_html helper, as other Vue components do, with invert_name (Surname, Firstname) and the card number where it was shown before. The 'Returned by' column uses its url option for the link to the patron's details page. 'Patron #%s' is wrapped with $__(). $patron_to_html escapes the patron data, so the names are rendered with v-html and no longer go through escapeHtml in the alert boxes. Test plan: 1. Create a patron with a first name, a middle name and a preferred name, and another one with only a surname 2. Check out items to both patrons, check them in on the check-in page => FAIL: The 'Returned by' column shows 'Surname, Firstname (card)', ignoring the preferred and middle names, and 'Surname, undefined' for the patron without a first name 3. Place a hold on an item for the first patron and check it in => FAIL: The hold modal shows the patron name built by hand too 4. Apply this patch and rebuild: $ ktd --shell k$ yarn js:build k$ restart_all 5. Repeat steps 2 and 3 => SUCCESS: Names are displayed as in the rest of the staff interface (e.g. 'Surname, Preferredname Middlename (cardnumber)'), linking to the same pages as before => SUCCESS: The patron without a first name shows only the surname 6. Repeat step 3 with HoldsAutoFill enabled => SUCCESS: The 'Hold filled for:' box shows the formatted name 7. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.