From bugzilla-daemon@bugs.koha-community.org Fri Sep 11 12:51:37 2026
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 43521] New: Reuse PatronSelect's patron name
formatter in patron-format.js
Date: Fri, 11 Sep 2026 12:51:34 +0000
Message-ID:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6934096529584310470=="
--===============6934096529584310470==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43521
Bug ID: 43521
Summary: Reuse PatronSelect's patron name formatter in
patron-format.js
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Patrons
Assignee: koha-bugs@lists.koha-community.org
Reporter: martin.renvoize@openfifth.co.uk
QA Contact: testopia@bugs.koha-community.org
CC: gmcharlt@gmail.com, kyle@bywatersolutions.com
Depends on: 43518
Target Milestone: ---
Bug 43518 added formatPatronName() (vue/utils/patron-options.js), a pure,
framework-free reimplementation of $patron_to_html()'s (patron-format.js)
name-assembly rules -- preferred_name/firstname, middle_name, other_name,
showDiffFirstname, invertName, hidePatronName, displayCardnumber, and the
no-name fallback -- but returning plain text for native Vue rendering instead
of an HTML string.
That means Koha now has two independent implementations of the same
formatting rules: $patron_to_html() (used across ~15+ .tt/.js consumers such
as catalogue/detail.tt, holds.js, ill-list-table.js,
checkout_renewals_modal.js)
and formatPatronName() (used by PatronSelect and anything that calls
patronToOption()/resolvePatronOption()). If the formatting rules change,
both need updating, and nothing enforces that.
This bug tracks having $patron_to_html() delegate its field-by-field
decisions to formatPatronName(), so there is exactly one source of truth.
The complication: patron-format.js is loaded as a plain, unbundled