Bug 15010 - Import patron tool creates 'duplicate' restrictions ( debarments )
Summary: Import patron tool creates 'duplicate' restrictions ( debarments )
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-14 12:48 UTC by Kyle M Hall
Modified: 2017-12-07 22:16 UTC (History)
6 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:
Circulation function:


Attachments
Bug 15010 - Import patron tool creates 'duplicate' restrictions ( debarments ) (2.21 KB, patch)
2015-10-14 12:51 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15010 - Import patron tool creates 'duplicate' restrictions ( debarments ) (2.33 KB, patch)
2015-10-19 17:23 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 15010 - Import patron tool creates 'duplicate' restrictions ( debarments ) (2.38 KB, patch)
2015-10-26 09:31 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 Kyle M Hall 2015-10-14 12:48:21 UTC
If a patron has restrictions and a CSV file of patrons to be overwritten is uploaded but has no debarred / debarredcomment columns, the a new restriction will be added that combines all the existing restrictions ( i.e. a new debarment based on the existing borrowers.debarred and borrowers.debarredcomment fields ).
Comment 1 Kyle M Hall (khall) 2015-10-14 12:51:14 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall (khall) 2015-10-19 17:23:54 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-10-26 09:31:21 UTC
Created attachment 43977 [details] [review]
Bug 15010 - Import patron tool creates 'duplicate' restrictions ( debarments )

If a patron has restrictions and a CSV file of patrons to be overwritten
is uploaded but has no debarred / debarredcomment columns, the a new
restriction will be added that combines all the existing restrictions (
i.e. a new debarment based on the existing borrowers.debarred
and borrowers.debarredcomment fields ).

Test Plan:
1) Create a patron with one or more restrictions
2) Import a CSV file that updates that patron, but with no debarred columns
3) Note a new restrictions is created
4) Delete the new restriction
5) Apply this patch
6) Re-import the CSV file again
7) Note that no new restriction is created
8) Add debarred and debarredcomment columns to the CSV file with a test
   date and description
9) Re-import the CSV file again
10) Note the new restriction is added to the patron

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Daniel Grobani <dgrobani@samuelmerritt.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Tomás Cohen Arazi (tcohen) 2015-10-30 13:06:50 UTC
Patch pushed to master.

Thanks Kyle!
Comment 5 Frédéric Demians 2015-11-29 19:47:16 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.
Comment 6 Liz Rea 2016-01-06 21:20:53 UTC
Pushed to 3.18.13, and released.