Bugzilla – Attachment 145461 Details for
Bug 31933
Import patrons fails when patron attribute value contains a comma
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31933: Import patrons fails when patron attribute value contains a comma
Bug-31933-Import-patrons-fails-when-patron-attribu.patch (text/plain), 2.92 KB, created by
Jacob O'Mara
on 2023-01-19 12:15:20 UTC
(
hide
)
Description:
Bug 31933: Import patrons fails when patron attribute value contains a comma
Filename:
MIME Type:
Creator:
Jacob O'Mara
Created:
2023-01-19 12:15:20 UTC
Size:
2.92 KB
patch
obsolete
>From 5857ec5a8f7af221de21b5a90f31effbeed694c2 Mon Sep 17 00:00:00 2001 >From: Jacob O'Mara <jacob.omara@ptfs-europe.com> >Date: Thu, 19 Jan 2023 12:10:57 +0000 >Subject: [PATCH] Bug 31933: Import patrons fails when patron attribute value > contains a comma > >Following on from our chat I have amended the documentation to reflect the required format for csv files and the issues with smart quotes. I have also included a reference csv download so users have a dummy file they can refer to for the correct format. > >Test Plan: >1. Navigate to the Import Patrons tool page >2. Observe the incorrect information in the notes box to the right (blue background) >3. Apply Patch >4. Observe that the documentation has now changed to reflect the above. >5. Test the CSV file download and check is in correct format. >--- > .../prog/en/modules/tools/import_borrowers.tt | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >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 2beeaaa0ad1..0b483d42cd5 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 >@@ -391,7 +391,12 @@ > > [% IF ( Koha.Preference('ExtendedPatronAttributes') ) %] > <li> >- 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: <strong>INSTID:12345,LANG:fr</strong> or <strong>STARTDATE:January 1 2010,TRACK:Day</strong>. 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: <strong>"STARTDATE:January 1, 2010","TRACK:Day"</strong>. The second syntax would be required if the data might have a comma in it, like a date string. >+ 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 and each attribute should be bounded in double quotes. For example: <strong>"INSTID:12345","LANG:fr"</strong> or <strong>"STARTDATE:January 1 2010","TRACK:Day"</strong>. It is also very important that smart quotes are disabled in your spreadsheet editor as this can cause the patron import to fail. Here is an example file of how this should look: >+ <a href='data:text/csv;charset=utf-8,cardnumber,surname,branchcode,categorycode,patron_attributes >+123456789,SMITH,REF,REF,"""COURSE:reference, course"",""CSCODE:cscode reference"""' >+ download="Patron attributes reference.csv"> >+ <strong>Click Here</strong> >+ </a> > </li> > [% END %] > >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31933
:
142475
|
145461
|
148166