<<

NAME

Koha::Patrons::Import - Perl Module containing import_patrons method exported from import_borrowers script.

SYNOPSIS

use Koha::Patrons::Import;

DESCRIPTION

This module contains one method for importing patrons in bulk.

FUNCTIONS

import_patrons

 my $return = Koha::Patrons::Import::import_patrons($params);

Applies various checks and imports patrons in bulk from a csv file.

Further pod documentation needed here.

prepare_columns

 my @csvcolumns = $self->prepare_columns({headerrow => $borrowerline, keycol => \%csvkeycol, errors => \@errors, });

Returns an array of all column key and populates a hash of colunm key positions.

set_attribute_types

 my $matchpoint_attr_type = $self->set_attribute_types({ extended => $extended, matchpoint => $matchpoint, });

Returns an attribute type based on matchpoint parameter.

set_column_keys

 my @columnkeys = set_column_keys($extended);

Returns an array of borrowers' table columns.

set_patron_attributes

 my $patron_attributes = set_patron_attributes($extended, $borrower{patron_attributes}, $feedback);

Returns a reference to array of hashrefs data structure as expected by SetBorrowerAttributes.

check_branch_code

 check_branch_code($borrower{branchcode}, $borrowerline, $line_number, \@missing_criticals);

Pushes a 'missing_criticals' error entry if no branch code or branch code does not map to a branch name.

check_borrower_category

 check_borrower_category($borrower{categorycode}, $borrowerline, $line_number, \@missing_criticals);

Pushes a 'missing_criticals' error entry if no category code or category code does not map to a known category.

format_dates

 format_dates({borrower => \%borrower, lineraw => $lineraw, line => $line_number, missing_criticals => \@missing_criticals, });

Pushes a 'missing_criticals' error entry for each of the 3 date types dateofbirth, dateenrolled and dateexpiry if it can not be formatted to the chosen date format. Populates the correctly formatted date otherwise.

AUTHOR

Koha Team

<<