Bug 11815 - Convert BorrowersTitles to an authorised value
Summary: Convert BorrowersTitles to an authorised value
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
Depends on: 20307
  Show dependency treegraph
Reported: 2014-02-21 16:23 UTC by Galen Charlton
Modified: 2019-11-02 20:53 UTC (History)
3 users (show)

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

Bug 11815: Convert BorrowersTitles to an authorised value (11.00 KB, patch)
2019-10-23 18:10 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Galen Charlton 2014-02-21 16:23:46 UTC
For the sake of consistency with things like road types and (eventually) ethnicity, the BorrowersTitles system preference should be converted to an authorized value type.
Comment 1 Owen Leonard 2019-10-23 18:10:18 UTC
Created attachment 94637 [details] [review]
Bug 11815: Convert BorrowersTitles to an authorised value

This patch removes the BorrowersTitles system preference in favor of
using authorized values to store patron titles.

To test, apply the patch and run the database update.

 - In Administration -> Authorized values, locate the category
 - Create two or more authorized values with new patron titles.
 - In Administration -> System preferences -> Patrons, there should be
   no entry for BorrowersTitles.
 - Create or edit a patron. Under "Salutation" your authorized values
   should appear correctly.
 - Log in to the OPAC and go to "Your personal details." Confirm that
   the correct values are shown there.
 - Remove all PATRON_TITLE authorized values and confirm that the
   "Salutation" field no longer appears on the staff client or OPAC
   patron entry form.
Comment 2 Séverine Queune 2019-10-29 14:22:48 UTC
Hi Owen,

Everything work as described, I only have a question about the last point.
After deleting all the valued in PATRON_TITLE, "Salutations" fields are correctly hidden on both OPAC and staff client, but until I modify the patron, the salutation I first saved is still displayed on different pages and breadcrumbs, for example :
 - /koha/circ/circulation.pl?
 - /koha/members/moremember.pl?
 - /koha/opac-main.pl
 - /koha/opac-user.pl
 - /koha/opac-memberentry.pl

Is the 'borrowers.title' sql field supposed to be cleaned after deleting the linked value, or does the patch behaves as you excepted and so I just have to sign it ?
Thank you !
Comment 3 Owen Leonard 2019-10-29 14:26:28 UTC
(In reply to Séverine Queune from comment #2)

> Is the 'borrowers.title' sql field supposed to be cleaned after deleting the
> linked value

The field is NOT expected to be cleared when the authorized value is removed. This is consistent with the current behavior of Koha, where removing the contents of the BorrowersTitles preference doesn't affect patron data. I do agree that it is confusing!