Bug 15842 - Cannot import patrons if the csv file does not contain privacy_guarantor_checkouts
Summary: Cannot import patrons if the csv file does not contain privacy_guarantor_chec...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on: 9303
Blocks: 15840
  Show dependency treegraph
 
Reported: 2016-02-17 14:20 UTC by Jonathan Druart
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15842 - Cannot import patrons if the csv file does not contain privacy_guarantor_checkouts (2.03 KB, patch)
2016-02-17 15:51 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15842 - Cannot import patrons if the csv file does not contain privacy_guarantor_checkouts (2.25 KB, patch)
2016-02-22 05:17 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 15842 - Cannot import patrons if the csv file does not contain privacy_guarantor_checkouts (2.31 KB, patch)
2016-02-29 09:20 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-02-17 14:20:21 UTC
When importing patrons with a csv file which does not contain the privacy_guarantor_checkouts column in the header, you will get

DBIx::Class::Storage::DBI::_dbh_execute(): Column 'privacy_guarantor_checkouts' cannot be null at /home/koha/src/C4/Members.pm line 768
Comment 1 Kyle M Hall 2016-02-17 15:51:09 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2016-02-22 04:45:58 UTC
(In reply to Kyle M Hall from comment #1)
> The same issue seems to occur for sms_provider_id.

Confirmed.
Comment 3 Mark Tompsett 2016-02-22 05:17:32 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2016-02-22 08:36:55 UTC
(In reply to M. Tompsett from comment #3)
> NOTE: While this patch does work, should it be solved only
> at this level? The issue that there is the lack of those two
> fields on the tools screen still exists.

Could you detail?
I don't understand what you suggest.
Comment 5 Mark Tompsett 2016-02-22 14:37:34 UTC
(In reply to Jonathan Druart from comment #4)
> Could you detail?
> I don't understand what you suggest.

"The issue that there is the lack of those two
fields on the tools screen still exists."

If they did exist, then I think the issue would be corrected in part (not in whole) from the proper use of the UI. Whereas, a crafted direct call would still be buggy. This corrects both, but it still leaves the UI incomplete (missing the SMS and guarantor fields). No warning messages tends to leave the problem unfixed.
Comment 6 Katrin Fischer 2016-02-22 20:31:10 UTC
I wonder if those 2 are interesting for patron load, but maybe in the context of migrations? Adding to the tool page could go on a separate bug report.
Comment 7 Mark Tompsett 2016-02-22 21:14:09 UTC
(In reply to Katrin Fischer from comment #6)
> I wonder if those 2 are interesting for patron load, but maybe in the
> context of migrations? Adding to the tool page could go on a separate bug
> report.

That works for me.
Comment 8 Jonathan Druart 2016-02-29 09:20:22 UTC
Created attachment 48434 [details] [review]
Bug 15842 - Cannot import patrons if the csv file does not contain privacy_guarantor_checkouts

When importing patrons with a csv file which does not contain the privacy_guarantor_checkouts column in the header, you will get
DBIx::Class::Storage::DBI::_dbh_execute(): Column 'privacy_guarantor_checkouts' cannot be null at /home/koha/src/C4/Members.pm line 768

The same issue seems to occur for sms_provider_id.

Test Plan:
1) Attempt to import patron csv file with no privacy_guarantor_checkouts column
2) Note the error
3) Apply this patch
4) Repeat step 1
5) The error should no longer occur

NOTE: While this patch does work, should it be solved only
at this level? The issue that there is the lack of those two
fields on the tools screen still exists.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Brendan Gallagher 2016-03-02 00:52:34 UTC
Pushed to Master - Should be in the May 2016 release. Thanks!
Comment 10 Julian Maurice 2016-03-07 08:08:39 UTC
Does not concern stable versions, status changed to RESOLVED