When we use the invert_name option with patron-title.inc, there is still a ',' displayed when the patron has no firstname. This is the normal case for organisations and also might be in some countries where the name structure is different. This is from holds queue (after bug 25555): [% INCLUDE 'patron-title.inc' invert_name=1 patron=itemsloo.patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]
Created attachment 105871 [details] [review] Bug 25747: Don't display a comma when patron has no firstname This patch adds a check for the existence of "firstname" to patron-title.inc so that if the patron has no firstname the "invert name" setting doesn't cause an unnecessary comma to appear. To test, apply the patch and locate or create a patron with no first name. - When checking out to the patron, examine the page title. It should say "Checking out to <lastname> (<cardnumber>). - When checking out to a patron with first and last name it should show as before, "Checking out to <lastname>, <firstname> (<cardnumber)
Created attachment 105883 [details] [review] Bug 25747: Don't display a comma when patron has no firstname This patch adds a check for the existence of "firstname" to patron-title.inc so that if the patron has no firstname the "invert name" setting doesn't cause an unnecessary comma to appear. To test, apply the patch and locate or create a patron with no first name. - When checking out to the patron, examine the page title. It should say "Checking out to <lastname> (<cardnumber>). - When checking out to a patron with first and last name it should show as before, "Checking out to <lastname>, <firstname> (<cardnumber) Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Created attachment 106115 [details] [review] Bug 25747: Don't display a comma when patron has no firstname This patch adds a check for the existence of "firstname" to patron-title.inc so that if the patron has no firstname the "invert name" setting doesn't cause an unnecessary comma to appear. To test, apply the patch and locate or create a patron with no first name. - When checking out to the patron, examine the page title. It should say "Checking out to <lastname> (<cardnumber>). - When checking out to a patron with first and last name it should show as before, "Checking out to <lastname>, <firstname> (<cardnumber) Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.02
missing dependencies, not backporting to 19.11.x
For the sake of release notes, I'm changing this from enhancement to bug. If you think that this is wrong, feel free to change it back.