When a patron is added to a fund as user and they have no surname, null is displayed instead: * Go to administration > funds * Edit fund * Click 'Add users' * Select a user, only staff users will be searchable * In the sample database, choose cardnumber 42 * After adding the user, the name displays as: null koha
The same display problems appears for the owner of a fund when the firstname is missing.
Still valid
Created attachment 161064 [details] [review] Bug 33457: Improve display of fund users when the patron has no firstname This patch updates the way the fund modification page handles patron names so that a patron with only a first name or only a surname will have their name appear correctly when selected as a manager or a user. To test, apply the patch if necessary, create a patron with only a first name and one with only a surname and give them acquisitions permissions. - Go to Administration -> Funds. - Edit a fund. - Click 'Add users'. - Select a user, only staff users will be searchable - Select one of the patrons you created. - The patron name should appear correctly - Test with both your first name only patron and your last name only patron. - Perform the same test with the 'Select owner' process.
Created attachment 161124 [details] [review] Bug 33457: Improve display of fund users when the patron has no firstname This patch updates the way the fund modification page handles patron names so that a patron with only a first name or only a surname will have their name appear correctly when selected as a manager or a user. To test, apply the patch if necessary, create a patron with only a first name and one with only a surname and give them acquisitions permissions. - Go to Administration -> Funds. - Edit a fund. - Click 'Add users'. - Select a user, only staff users will be searchable - Select one of the patrons you created. - The patron name should appear correctly - Test with both your first name only patron and your last name only patron. - Perform the same test with the 'Select owner' process. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Can we not use koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc here?
Created attachment 161299 [details] [review] Bug 33457: Improve display of fund users when the patron has no firstname This patch updates the way the fund modification page handles patron names so that a patron with only a first name or only a surname will have their name appear correctly when selected as a manager or a user. To test, apply the patch if necessary, create a patron with only a first name and one with only a surname and give them acquisitions permissions. - Go to Administration -> Funds. - Edit a fund. - Click 'Add users'. - Select a user, only staff users will be searchable - Select one of the patrons you created. - The patron name should appear correctly - Test with both your first name only patron and your last name only patron. - Perform the same test with the 'Select owner' process. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 161300 [details] [review] Bug 33457: (QA follow-up) Use js-patron-format instead This patch updates the code to use the $patron_to_html js function rather than replicating it locally.. this means if in the future we introduce further fixes/improvements to the display they're affect here too. Test plan 1) As for the original implementation, confirm the fix is still fixed
If someone fancies checking my follow-up still achieves the desired affect without regressions, I think we could PQA here.
Created attachment 161392 [details] [review] Bug 33457: (follow-up) Simplify even further
Created attachment 161395 [details] [review] Bug 33457: (QA follow-up) Use js-patron-format instead This patch updates the code to use the $patron_to_html js function rather than replicating it locally.. this means if in the future we introduce further fixes/improvements to the display they're affect here too. Test plan 1) As for the original implementation, confirm the fix is still fixed Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 161396 [details] [review] Bug 33457: (follow-up) Simplify even further Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Pushed for 24.05! Well done everyone, thank you!
Depends on Bug 29575 that added $patron_to_html
Pushed to 23.11.x for 23.11.03
Backported to 23.05.x for upcoming 23.05.09