Bug 12598: Re-add some missing stuffs
This patch will have to be squashed with previous ones, but for readability I prefer to let it alone for now. It reintroduces 2 missing changes: commitfd12390365Bug 15010: Import patron tool creates 'duplicate' restrictions ( debarments ) commit011d8e9855Bug 12543 - Add userid as matchpoint for "Import patrons" tool Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
c9c0697ca5
commit
b361ff2d7d
|
|
@ -165,6 +165,9 @@ sub import_patrons {
|
|||
if ( defined($matchpoint) && ( $matchpoint eq 'cardnumber' ) && ( $borrower{'cardnumber'} ) ) {
|
||||
$member = Koha::Patrons->find( { cardnumber => $borrower{'cardnumber'} } );
|
||||
}
|
||||
elsif ( ($matchpoint eq 'userid') && ($borrower{'userid'}) ) {
|
||||
$member = Koha::Patrons->find( { userid => $borrower{userid} } );
|
||||
}
|
||||
elsif ($extended) {
|
||||
if ( defined($matchpoint_attr_type) ) {
|
||||
foreach my $attr (@$patron_attributes) {
|
||||
|
|
@ -244,7 +247,8 @@ sub import_patrons {
|
|||
);
|
||||
next LINE;
|
||||
}
|
||||
if ( $borrower{debarred} ) {
|
||||
# Don't add a new restriction if the existing 'combined' restriction matches this one
|
||||
if ( $borrower{debarred} && ( ( $borrower{debarred} ne $member->{debarred} ) || ( $borrower{debarredcomment} ne $member->{debarredcomment} ) ) ) {
|
||||
|
||||
# Check to see if this debarment already exists
|
||||
my $debarrments = GetDebarments(
|
||||
|
|
|
|||
Loading…
Reference in New Issue