Bug 25747 - Don't display a comma when patron has no firstname
Summary: Don't display a comma when patron has no firstname
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 25555
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-14 11:48 UTC by Katrin Fischer
Modified: 2020-07-13 02:38 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.02


Attachments
Bug 25747: Don't display a comma when patron has no firstname (1.86 KB, patch)
2020-06-15 11:18 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25747: Don't display a comma when patron has no firstname (1.92 KB, patch)
2020-06-15 13:44 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 25747: Don't display a comma when patron has no firstname (1.98 KB, patch)
2020-06-21 14:07 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-06-14 11:48:04 UTC
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" %]
Comment 1 Owen Leonard 2020-06-15 11:18:55 UTC
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)
Comment 2 PTFS Europe Sandboxes 2020-06-15 13:44:55 UTC
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>
Comment 3 Katrin Fischer 2020-06-21 14:07:54 UTC
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>
Comment 4 Jonathan Druart 2020-06-24 13:33:05 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 5 Lucas Gass 2020-07-10 16:32:56 UTC
backported to 20.05.x for 20.05.02
Comment 6 Aleisha Amohia 2020-07-13 02:38:29 UTC
missing dependencies, not backporting to 19.11.x