Bug 16891: Move C4::Members::MoveMemberToDeleted to Koha::Patron->move_to_deleted
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Sat, 9 Jul 2016 15:03:11 +0000 (16:03 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Oct 2016 16:20:27 +0000 (16:20 +0000)
commit20c44f005138d2f585eeb1336a93920629b52d3c
treec7120ef7ecb1f17cd93e650235f8dd0c73192a21
parent6fb994257ecf74f65b0951564341561dd40df3a5
Bug 16891: Move C4::Members::MoveMemberToDeleted to Koha::Patron->move_to_deleted

This patch removes the C4::Members::MoveMemberToDeleted subroutine in
order to replace it with the Koha::Patron->move_to_deleted method.
Next after this change, we will move C4::Members::HandleDelBorrower and
C4::Members::DelMember to the same module to simplify the code in
members/deletemem.pl and misc/cronjobs/delete_patrons.pl

Test plan:
1/ Delete a patron from the staff interface and make sure (s)he has been moved to
the deletedborrowers table.
2/ Use the "Batch patron deletion" tool (tools/cleanborrowers.pl) to
remove patron. Make sure the "Permanently delete these patrons" and "Move
these patrons to the trash" options work as before
3/ Same as previously but using the cronjob
misc/cronjobs/delete_patrons.pl.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tested the delete_patrons.pl script and cleanborrowers.pl too.
Tests (are relevant and) pass and the qa scripts are happy too :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/Members.pm
Koha/Patron.pm
members/deletemem.pl
misc/cronjobs/delete_patrons.pl
t/db_dependent/Koha/Patrons.t
t/db_dependent/Members.t
tools/cleanborrowers.pl