From 61af4786ee1a8d630f260d7caed5f01fb16ab242 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Sep 2014 16:26:52 +0200 Subject: [PATCH] Bug 12929: Restore behavior before bug 12716 This patch remove borrowernumber from the borrower list fields and display the field list in the notes. Test plan: - verify that the list of fields is displayed on the right (Notes). - verify the borrowernumber is not displayed anymore in the field list. Signed-off-by: Petter Goksoyr Asen Confirmed that this patch removes borrowernumber from list of default values, and reintroduces missing list of CSV columns in the Notes field. Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/tools/import_borrowers.tt | 2 +- tools/import_borrowers.pl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt index a0727b860d..d3bcf5c77f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt @@ -195,7 +195,7 @@
  • The first line in the file must be a header row defining which columns you are supplying in the import file.
  • Download a starter CSV file with all the columns here. Values are comma-separated.
  • OR choose which fields you want to supply from the following list:
    • - [% FOREACH columnkey IN columnkeys %]'[% columnkey.key %]', [% END %] + [% FOREACH columnkey IN borrower_fields %]'[% columnkey.field %]', [% END %]
  • [% IF ( ExtendedPatronAttributes ) %]
  • If loading patron attributes, the 'patron_attributes' field should contain a comma-separated list of attribute types and values. The attribute type code and a colon should precede each value. For example: INSTID:12345,LANG:fr or STARTDATE:January 1 2010,TRACK:Day. If an input record has more than one attribute, the fields should either be entered as an unquoted string (previous examples), or with each field wrapped in separate double quotes and delimited by a comma: "STARTDATE:January 1, 2010","TRACK:Day". The second syntax would be required if the data might have a comma in it, like a date string. diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl index 66d1485372..4bd89aadf1 100755 --- a/tools/import_borrowers.pl +++ b/tools/import_borrowers.pl @@ -85,8 +85,9 @@ $template->param( branches => $branches ) if ( $branches ); # get the patron categories and pass them to the template my $categories = GetBorrowercategoryList(); $template->param( categories => $categories ) if ( $categories ); -my $columns = C4::Templates::GetColumnDefs( $input ); -$template->param( borrower_fields => $columns->{borrowers} ); +my $columns = C4::Templates::GetColumnDefs( $input )->{borrowers}; +$columns = [ grep { $_->{field} ne 'borrowernumber' ? $_ : () } @$columns ]; +$template->param( borrower_fields => $columns ); if ($input->param('sample')) { print $input->header( -- 2.39.5