Bug 11815 - Convert BorrowersTitles to an authorised value
Summary: Convert BorrowersTitles to an authorised value
Status: BLOCKED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 20307
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-21 16:23 UTC by Galen Charlton
Modified: 2020-02-19 00:31 UTC (History)
4 users (show)

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


Attachments
Bug 11815: Convert BorrowersTitles to an authorised value (11.00 KB, patch)
2019-10-23 18:10 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11815: Convert BorrowersTitles to an authorised value (11.95 KB, patch)
2020-02-10 13:56 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11815: Convert BorrowersTitles to an authorised value (12.63 KB, patch)
2020-02-10 13:59 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11815: Convert BorrowersTitles to an authorised value (12.67 KB, patch)
2020-02-10 15:52 UTC, David Nind
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 Comment hidden (obsolete)
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!
Comment 4 David Nind 2020-01-29 02:12:39 UTC
Two queries from testing:

1) Does the Description (OPAC) text for the authorized value appear anywhere? I had two different values for Description and Description (OPAC). On the OPAC I could only see what is in the Description.

2) I'm getting this error when trying to search in OPAC and staff interface (even though it is not in the test plan) - can post the full error somewhere if required: 
> Error trace
> DBIx::Class::Storage::DBI::_dbh_execute(): 'localization.translation' isn't in GROUP BY at /kohadevbox/koha/Koha/Objects.pm line 130
>  at /usr/share/perl5/DBIx/Class/Exception.pm line 77
> in DBIx::Class::Exception::throw at /usr/share/perl5/DBIx/Class/Exception.pm line 77

Otherwise, everything works as expected.
Comment 5 David Nind 2020-02-07 22:40:49 UTC
Patch no longer applies 8-(
Comment 6 Owen Leonard 2020-02-10 13:56:50 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2020-02-10 13:59:36 UTC
Created attachment 98657 [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
   'PATRON_TITLE'.
 - 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 8 David Nind 2020-02-10 15:52:51 UTC
Created attachment 98668 [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
   'PATRON_TITLE'.
 - 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.

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Katrin Fischer 2020-02-19 00:31:49 UTC
Currently BLOCKED by the dependency on bug 20307.