Bug 22386 - Importing using attributes as matchpoint broken
Summary: Importing using attributes as matchpoint broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Nick Clemens
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on: 19936
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-21 14:27 UTC by Nick Clemens
Modified: 2020-01-06 20:17 UTC (History)
7 users (show)

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


Attachments
Bug 22386: Unit tests (6.43 KB, patch)
2019-02-21 14:33 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22386: Define patron variable when matchign on extended attributes (1.18 KB, patch)
2019-02-21 14:33 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22386: Unit tests (6.48 KB, patch)
2019-02-21 14:50 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22386: Define patron variable when matchign on extended attributes (1.24 KB, patch)
2019-02-21 14:50 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22386: Unit tests (6.55 KB, patch)
2019-02-21 16:27 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22386: Define patron variable when matchign on extended attributes (1.31 KB, patch)
2019-02-21 16:27 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22386: Remove debug statements (1.53 KB, patch)
2019-02-21 16:27 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 Nick Clemens 2019-02-21 14:27:33 UTC
Attempting to import patrons and matching on extended attributes fails with a software error when matching borrower found
Comment 1 Nick Clemens 2019-02-21 14:33:12 UTC
Created attachment 85447 [details] [review]
Bug 22386: Unit tests
Comment 2 Nick Clemens 2019-02-21 14:33:15 UTC
Created attachment 85448 [details] [review]
Bug 22386: Define patron variable when matchign on extended attributes

For all other methods we define a patron object and check the userid,
we just need to define the $patron here

To test:
0 - Apply unit test patch alone
1 - prove t/db_dependent/Koha/Patrons/Import.t
2 - It dies
3 - Apply this patch
4 - repeat tests
5 - It passes!
Comment 3 Nick Clemens 2019-02-21 14:50:51 UTC
Created attachment 85449 [details] [review]
Bug 22386: Unit tests

Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>
Comment 4 Nick Clemens 2019-02-21 14:50:53 UTC
Created attachment 85450 [details] [review]
Bug 22386: Define patron variable when matchign on extended attributes

For all other methods we define a patron object and check the userid,
we just need to define the $patron here

To test:
0 - Apply unit test patch alone
1 - prove t/db_dependent/Koha/Patrons/Import.t
2 - It dies
3 - Apply this patch
4 - repeat tests
5 - It passes!

Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>
Comment 5 Jonathan Druart 2019-02-21 16:24:45 UTC
Error is:
Can't call method "userid" on an undefined value at /home/vagrant/kohaclone/Koha/Patrons/Import.pm line 205, <$handle_4> line 4.
Comment 6 Jonathan Druart 2019-02-21 16:27:13 UTC
Created attachment 85454 [details] [review]
Bug 22386: Unit tests

Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2019-02-21 16:27:18 UTC
Created attachment 85455 [details] [review]
Bug 22386: Define patron variable when matchign on extended attributes

For all other methods we define a patron object and check the userid,
we just need to define the $patron here

To test:
0 - Apply unit test patch alone
1 - prove t/db_dependent/Koha/Patrons/Import.t
2 - It dies
3 - Apply this patch
4 - repeat tests
5 - It passes!

Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2019-02-21 16:27:23 UTC
Created attachment 85456 [details] [review]
Bug 22386: Remove debug statements

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Nick Clemens 2019-02-22 15:09:10 UTC
Awesome work all!

Pushed to master for 19.05
Comment 10 Martin Renvoize 2019-02-26 09:21:38 UTC
Pushed to 18.11.x for 18.11.04
Comment 11 Lucas Gass 2019-03-06 23:39:17 UTC
backported to 18.05.x for 18.05.11
Comment 12 Fridolin Somers 2019-03-12 08:18:45 UTC
Depends on Bug 19936 not in 17.11.x
Comment 13 Fridolin Somers 2019-03-26 06:28:46 UTC Comment hidden (obsolete)