View | Details | Raw Unified | Return to bug 6725
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_6725.perl (+11 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
4
    $dbh->do( q{
5
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES
6
        ('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free')
7
    });
8
9
    # Always end with this (adjust the bug info)
10
    NewVersion( $DBversion, 6725, "Adds PatronDuplicateMatchingAddFields system preference");
11
}
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 482-487 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
482
('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'),
482
('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'),
483
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
483
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
484
('PatronAutoComplete','1','Try|Don\'t try','to guess the patron being entered while typing a patron search for circulation or patron search. Only returns the first 10 results at a time.','YesNo'),
484
('PatronAutoComplete','1','Try|Don\'t try','to guess the patron being entered while typing a patron search for circulation or patron search. Only returns the first 10 results at a time.','YesNo'),
485
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free')
485
('patronimages','0',NULL,'Enable patron images for the Staff Client','YesNo'),
486
('patronimages','0',NULL,'Enable patron images for the Staff Client','YesNo'),
486
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
487
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
487
('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'),
488
('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+6 lines)
Lines 228-233 Patrons: Link Here
228
               housebound: "Housebound roles"
228
               housebound: "Housebound roles"
229
               additional: "Additional attributes and identifiers"
229
               additional: "Additional attributes and identifiers"
230
               messaging: "Patron messaging preferences"
230
               messaging: "Patron messaging preferences"
231
     -
232
         - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a>:"
233
         - pref: PatronDuplicateMatchingAddFields
234
           type: modalselect
235
           source: borrowers
236
         - "will be used deduplicate patrons."
231
    Patron relationships:
237
    Patron relationships:
232
     -
238
     -
233
         - "Guarantors can be the following of those they guarantee:"
239
         - "Guarantors can be the following of those they guarantee:"
(-)a/members/memberentry.pl (-5 / +3 lines)
Lines 254-264 if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) Link Here
254
254
255
# Test uniqueness of surname, firstname and dateofbirth
255
# Test uniqueness of surname, firstname and dateofbirth
256
if ( ( $op eq 'insert' ) and !$nodouble ) {
256
if ( ( $op eq 'insert' ) and !$nodouble ) {
257
    my @dup_fields = split '\|', C4::Context->preference('PatronDuplicateMatchingAddFields');
257
    my $conditions;
258
    my $conditions;
258
    $conditions->{surname} = $newdata{surname} if $newdata{surname};
259
    for my $f ( @dup_fields ) {
259
    if ( $category_type ne 'I' ) {
260
        $conditions->{$f} = $newdata{$f} if $newdata{$f};
260
        $conditions->{firstname} = $newdata{firstname} if $newdata{firstname};
261
        $conditions->{dateofbirth} = $newdata{dateofbirth} if $newdata{dateofbirth};
262
    }
261
    }
263
    $nodouble = 1;
262
    $nodouble = 1;
264
    my $patrons = Koha::Patrons->search($conditions); # FIXME Should be search_limited?
263
    my $patrons = Koha::Patrons->search($conditions); # FIXME Should be search_limited?
265
- 

Return to bug 6725