Bug 19012

Summary: Note additional columns that are required during patron import
Product: Koha Reporter: Nick Clemens <nick>
Component: ToolsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jesse, jonathan.druart, katrin.fischer, lucas, m.de.rooy, martin.renvoize, mtompset
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23077
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14601
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.03
Attachments: Bug 19012 - Note additional columns that are required during patron import
[SIGNED OFF] Bug 19012 - Note additional columns that are required during patron import
Bug 19012 - Note additional columns that are required during patron import
Really Spare Patron Import.
Really realy spare patron import
Bug 19012 - Note additional columns that are required during patron import
Bug 19012: Note additional columns that are required during patron import

Description Nick Clemens 2017-07-31 16:15:32 UTC
We say 'branchcode' and 'categorycode' are required - this is true, but so are surname and cardnumber
Comment 1 Nick Clemens 2017-07-31 16:17:55 UTC
Created attachment 65363 [details] [review]
Bug 19012 - Note additional columns that are required during patron import

This adds surname and cardnumber to the list of required columns on the
import tool screen and help page

To test:
Read the updated notes, verify it is true and understandable
Comment 2 Katrin Fischer 2017-08-08 21:54:40 UTC
Created attachment 65693 [details] [review]
[SIGNED OFF] Bug 19012 - Note additional columns that are required during patron import

This adds surname and cardnumber to the list of required columns on the
import tool screen and help page

To test:
Read the updated notes, verify it is true and understandable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Jonathan Druart 2017-08-09 17:34:01 UTC
No, they are not mandatory. It's the default value for BorrowerMandatoryField, but can be removed, and others can be added. I guess you will have to parse the pref to display which fields are mandatory.
Comment 4 Katrin Fischer 2017-08-09 18:51:28 UTC
That's interesting, I didn't know that!
Comment 5 Katrin Fischer 2017-08-09 18:52:47 UTC
Hm, in my experience surname and cardnumber were always needed and it seemed to make sense, now I wonder.
Comment 6 Katrin Fischer 2017-08-09 21:17:00 UTC
I'd done some testing and looking at the code, surname is a mandatory hardcoded value:

150: my @criticals = qw(surname branchcode categorycode);    # there probably should be others

Cardnumber in fact isn't!
Comment 7 Nick Clemens 2019-06-07 12:46:47 UTC
Created attachment 90419 [details] [review]
Bug 19012 - Note additional columns that are required during patron import

This adds surname and cardnumber to the list of required columns on the
import tool screen and help page

To test:
Read the updated notes, verify it is true and understandable
Comment 8 Nick Clemens 2019-06-07 12:48:20 UTC
*** Bug 20671 has been marked as a duplicate of this bug. ***
Comment 9 Nick Clemens 2019-06-07 12:49:05 UTC
(In reply to Jonathan Druart from comment #3)
> No, they are not mandatory. It's the default value for
> BorrowerMandatoryField, but can be removed, and others can be added. I guess
> you will have to parse the pref to display which fields are mandatory.

Nope, test it, fields required in the pref are not required for import - that may be its own bug if you wish
Comment 10 Mark Tompsett 2019-06-17 23:59:03 UTC
Created attachment 90708 [details]
Really Spare Patron Import.

This is a scary example of what patron import let's you import.
I suspect if you had userid set and empty card number and used userid as the match, it would import too.
Comment 11 Mark Tompsett 2019-06-18 00:00:29 UTC
I got away with cardnumber, branch code, and category code. If we are correcting the text to match what it does, then the text is still wrong.

If we are fixing the import and matching the text, then that's still broken.
Comment 12 Nick Clemens 2019-06-18 10:45:05 UTC
Created attachment 90721 [details]
Really realy spare patron import

Remove surname from the file and it fails on missing a critical column
Comment 13 Mark Tompsett 2019-06-20 15:57:58 UTC
Created attachment 90856 [details] [review]
Bug 19012 - Note additional columns that are required during patron import

This adds surname and cardnumber to the list of required columns on the
import tool screen and help page

To test:
Read the updated notes, verify it is true and understandable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 14 Marcel de Rooy 2019-07-05 08:58:00 UTC
Created attachment 91328 [details] [review]
Bug 19012: Note additional columns that are required during patron import

This adds surname and cardnumber to the list of required columns on the
import tool screen and help page

To test:
Read the updated notes, verify it is true and understandable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 15 Martin Renvoize 2019-07-15 11:21:25 UTC
Nice work!

Pushed to master for 19.11.00
Comment 16 Fridolin Somers 2019-07-30 05:34:12 UTC
Pushed to 19.05.x for 19.05.03
Comment 17 Lucas Gass 2019-08-06 15:09:27 UTC
backported to 18.11.x for 18.11.09