Bug 9341: Problem with UNIMARC authors facets

In UNIMARC installations the authors have a double comma separating the subfield a and the subfield b.

Test plan:

- After applying the patch do a search and check the double comma in authors facets.
- Apply the patch
- Do a new search
- Check if authors facets as a double comma

Sponsored-by: KEEP SOLUTIONS
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Conflicts:
	installer/data/mysql/sysprefs.sql
	installer/data/mysql/updatedatabase.pl

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Conflicts:
	installer/data/mysql/sysprefs.sql

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This commit is contained in:
Vitor FERNANDES 2013-02-18 10:42:10 +00:00 committed by Chris Cormack
parent d9f74283bd
commit cd173ef3fd
4 changed files with 13 additions and 1 deletions

View File

@ -701,7 +701,7 @@ sub getFacets {
idx => 'au',
label => 'Authors',
tags => [ qw/ 700ab 701ab 702ab / ],
sep => ', ',
sep => C4::Context->preference("UNIMARCAuthorsFacetsSeparator"),
},
{
idx => 'se',

View File

@ -365,3 +365,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SuspendHoldsIntranet', '1', NULL , 'Allow holds to be suspended from the intranet.', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SuspendHoldsOpac', '1', NULL , 'Allow holds to be suspended from the OPAC.', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('UNIMARCAuthorsFacetsSeparator',', ', 'UNIMARC authors facets separator', NULL, 'short');

View File

@ -5331,6 +5331,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
SetVersion($DBversion);
}
$DBversion = "3.08.11.001";
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('UNIMARCAuthorsFacetsSeparator',', ', 'UNIMARC authors facets separator', NULL, 'short')");
print "Upgrade to $DBversion done (Bug 9341: Problem with UNIMARC authors facets)\n";
SetVersion ($DBversion);
}
=head1 FUNCTIONS
=head2 TableExists($table)

View File

@ -172,3 +172,7 @@ Searching:
- pref: FacetLabelTruncationLength
class: integer
- characters, in OPAC/staff interface.
-
- Use the following text as separator for UNIMARC authors facets
- pref: UNIMARCAuthorsFacetsSeparator
class: short