Bug 11975

Summary: Tools: Batch patron deletion code should be improved
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 11352    
Bug Blocks:    
Attachments: Bug 11975: Batch patron deletion code should be improved
Bug 11975: improve the batch patron deletion code
Bug 11975: (follow-up) simplify construction of params for GetBorrowersToExpunge()
[PASSED QA] Bug 11975: improve the batch patron deletion code
[PASSED QA] Bug 11975: (follow-up) simplify construction of params for GetBorrowersToExpunge()

Description Jonathan Druart 2014-03-20 15:42:06 UTC

    
Comment 1 Jonathan Druart 2014-03-20 15:48:09 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2014-05-08 15:22:27 UTC Comment hidden (obsolete)
Comment 3 Galen Charlton 2014-05-08 15:22:31 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2014-05-09 12:20:01 UTC
Created attachment 28129 [details] [review]
[PASSED QA] Bug 11975: improve the batch patron deletion code

This patch tries to improve the code for the cleanborrowers.pl tool.

- use KohaDates plugin and Koha::DateUtils for date management,
  removing a dependency on C4::Dates
- replace variables step1, step2 and step3 with step
- add a JavaScript check if no action if checked

Test plan:
- Backup your DB
- Play with the Patron deletion/anonymisation tool and try to find
  something inconsistent.
If you don't find something different, it works!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Kyle M Hall 2014-05-09 12:20:15 UTC
Created attachment 28130 [details] [review]
[PASSED QA] Bug 11975: (follow-up) simplify construction of params for GetBorrowersToExpunge()

This patch consolidates the code for constructing the parameters for
GetBorrowersToExpunge() into a subroutine.  As a side-effect, this
fixes a regression introduced by the main patch where no patrons would
be deleted when filtering by expiration date.

To test:

[1] Follow the test plan in the main patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Galen Charlton 2014-05-09 14:49:53 UTC
Pushed to master.  Thanks, Jonathan!