Koha::Patrons::Import - Perl Module containing import_patrons method exported from import_borrowers script.
use Koha::Patrons::Import;
This module contains one method for importing patrons in bulk.
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.
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.
my $matchpoint_attr_type = $self->set_attribute_types({ extended => $extended, matchpoint => $matchpoint, });
Returns an attribute type based on matchpoint parameter.
my @columnkeys = set_column_keys($extended);
Returns an array of borrowers' table columns.
my $patron_attributes = generate_patron_attributes($extended, $borrower{patron_attributes}, $feedback);
Returns a Koha::Patron::Attributes as expected by Koha::Patron->extended_attributes
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($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({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.
Koha Team