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.
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.
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 :
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 !
(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!