Bug 11975 - Tools: Batch patron deletion code should be improved
Summary: Tools: Batch patron deletion code should be improved
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 11352
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-20 15:42 UTC by Jonathan Druart
Modified: 2014-12-07 20:07 UTC (History)
1 user (show)

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


Attachments
Bug 11975: Batch patron deletion code should be improved (14.14 KB, patch)
2014-03-20 15:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11975: improve the batch patron deletion code (14.23 KB, patch)
2014-05-08 15:22 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 11975: (follow-up) simplify construction of params for GetBorrowersToExpunge() (4.43 KB, patch)
2014-05-08 15:22 UTC, Galen Charlton
Details | Diff | Splinter Review
[PASSED QA] Bug 11975: improve the batch patron deletion code (14.30 KB, patch)
2014-05-09 12:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 11975: (follow-up) simplify construction of params for GetBorrowersToExpunge() (4.50 KB, patch)
2014-05-09 12:20 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!