Bug 30568 - Make patron name fields more flexible
Summary: Make patron name fields more flexible
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 24710 (view as bug list)
Depends on: 30617
Blocks: 7680
  Show dependency treegraph
 
Reported: 2022-04-20 08:47 UTC by Martin Renvoize
Modified: 2022-05-06 15:35 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2022-04-20 08:47:42 UTC
We've had a number of bugs around patron name fields..

* Requests for additional fields
* Requests for changes in display order
* Requests for improved duplicate finding
* Requests for improved table sorting

I intend to collect opinions here and try to come up with a solution that suits more options.
Comment 1 Martin Renvoize 2022-04-20 09:01:25 UTC
In bug 21978 comment 9 Christopher Brannon suggests

>What if we could just get away from the name structures, and have 5 or 6 generic >name fields (i.e. Name1, Name2, Name3 etc.), and we can label them in the editor >for whatever purpose we need, and on screens they appear in the order that they >are used.  For example, Name1 is used as Surname, Name2 is First Name, Name3 is >Middle Name, and so on.  Sort will always sort in order of the fields (Name1 >first, Name2 next, and so on), and would display similar to how they appear now:
>
>In results:
>Name1, Name2 [Name3] [Name4] [Name5] [Name6]
>
>On patron account:
>Name2 [Name3] [Name4] [Name5] [Name6] Name1
>

I think this approach could work well, but it needs a little thought as to how it would work with de-duplicating and sorting and we may still need to implement display templating on top as currently you can call the patron-title include with various options for different displays in different places.

I wonder if we could refine our display to a couple of more formal options.. 'short' and 'long' form perhaps.. right now we have various combinations of options in the template.. like including title or not, othernames, inverse ordering, cardnumber, linking.. etc etc
Comment 2 Martin Renvoize 2022-04-20 09:26:30 UTC
patron-title.inc currently allows for the following output formats

* surname (othernames)
* <span class="patron-title">title</span> surname, firstname (othernames) 
* <span class="patron-title">title</span> firtname (othernames) surname
* title surname, firstname (othernames)
* title firstname (othernames) surname
* surname (othernames) (cardnumber)
* <span class="patron-title">title</span> surname, firstname (othernames) (cardnumber)
* <span class="patron-title">title</span> firtname (othernames) surname (cardnumber)
* title surname, firstname (othernames) (cardnumber)
* title firstname (othernames) surname (cardnumber)
* cardnumber
* <span>A patron from library [% Branches.GetName( patron.branchcode ) | html -%]</span>
Comment 3 Martin Renvoize 2022-04-27 06:56:03 UTC
*** Bug 24710 has been marked as a duplicate of this bug. ***
Comment 4 Martin Renvoize 2022-04-27 06:59:04 UTC
There was a try at doing this by surrounding name fields by spans, bug 24710, in the template includes, but it became clear that wasn't an option as the no_html option on the includes, used for title elements, precludes us from using said spans.