Bug 16907

Summary: Move DelMember and HandleDelBorrower to Koha::Patron
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: kyle, martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 16890, 16891    
Bug Blocks: 16846    
Attachments: Bug 16907: Koha::Patrons - Move DelMember to ->delete
Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete
Bug 16907: Koha::Patrons - Move DelMember to ->delete
Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete
Bug 16907: Make sure the log will be written only if the patron has been deleted
Bug 16907: Koha::Patrons - Move DelMember to ->delete
Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete
Bug 16907: Make sure the log will be written only if the patron has been deleted
Bug 16907: Koha::Patrons - Move DelMember to ->delete
Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete
Bug 16907: Make sure the log will be written only if the patron has been deleted
[PASSED QA] Bug 16907: Koha::Patrons - Move DelMember to ->delete
[PASSED QA] Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete
[PASSED QA] Bug 16907: Make sure the log will be written only if the patron has been deleted

Description Jonathan Druart 2016-07-12 18:06:31 UTC

    
Comment 1 Jonathan Druart 2016-07-12 18:08:23 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-07-12 18:08:37 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-07-20 14:14:37 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2016-07-20 14:14:40 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-08-09 09:17:43 UTC Comment hidden (obsolete)
Comment 6 Tomás Cohen Arazi 2016-08-12 22:50:48 UTC
Created attachment 54401 [details] [review]
Bug 16907: Koha::Patrons - Move DelMember to ->delete

This patch moves the C4::Members::DelMember subroutine to the
Koha::Patron module.
The delete method must be overwritten to permit handling of patron's
holds.

Test plan:
(With the 2 patches applied)
1/ Create a patron with holds and owner of lists
2/ Delete patrons using the web interface:
 - More > Delete on a patron page
 - Batch patron deletion tools
3/ and the cronjob script
 - perl misc/cronjobs/delete_patrons.pl -c [more options]

The patron should have been moved to the deletedborrowers table, his/her
holds and lists should have been deleted.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Tomás Cohen Arazi 2016-08-12 22:50:54 UTC
Created attachment 54402 [details] [review]
Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete

This job should be done each time patron data are deleted. It's better
to do it just before deleting the patron than assuming the caller did
the job by itself.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Tomás Cohen Arazi 2016-08-12 22:51:00 UTC
Created attachment 54403 [details] [review]
Bug 16907: Make sure the log will be written only if the patron has been deleted

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Tomás Cohen Arazi 2016-08-12 22:51:50 UTC
Nice work, Jonathan.
Comment 10 Jonathan Druart 2016-10-13 10:42:15 UTC
Created attachment 56342 [details] [review]
Bug 16907: Koha::Patrons - Move DelMember to ->delete

This patch moves the C4::Members::DelMember subroutine to the
Koha::Patron module.
The delete method must be overwritten to permit handling of patron's
holds.

Test plan:
(With the 2 patches applied)
1/ Create a patron with holds and owner of lists
2/ Delete patrons using the web interface:
 - More > Delete on a patron page
 - Batch patron deletion tools
3/ and the cronjob script
 - perl misc/cronjobs/delete_patrons.pl -c [more options]

The patron should have been moved to the deletedborrowers table, his/her
holds and lists should have been deleted.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Jonathan Druart 2016-10-13 10:42:18 UTC
Created attachment 56343 [details] [review]
Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete

This job should be done each time patron data are deleted. It's better
to do it just before deleting the patron than assuming the caller did
the job by itself.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 12 Jonathan Druart 2016-10-13 10:42:22 UTC
Created attachment 56344 [details] [review]
Bug 16907: Make sure the log will be written only if the patron has been deleted

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Martin Renvoize 2016-10-13 15:36:20 UTC
Created attachment 56419 [details] [review]
[PASSED QA] Bug 16907: Koha::Patrons - Move DelMember to ->delete

This patch moves the C4::Members::DelMember subroutine to the
Koha::Patron module.
The delete method must be overwritten to permit handling of patron's
holds.

Test plan:
(With the 2 patches applied)
1/ Create a patron with holds and owner of lists
2/ Delete patrons using the web interface:
 - More > Delete on a patron page
 - Batch patron deletion tools
3/ and the cronjob script
 - perl misc/cronjobs/delete_patrons.pl -c [more options]

The patron should have been moved to the deletedborrowers table, his/her
holds and lists should have been deleted.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 14 Martin Renvoize 2016-10-13 15:36:34 UTC
Created attachment 56420 [details] [review]
[PASSED QA] Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete

This job should be done each time patron data are deleted. It's better
to do it just before deleting the patron than assuming the caller did
the job by itself.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Martin Renvoize 2016-10-13 15:36:38 UTC
Created attachment 56421 [details] [review]
[PASSED QA] Bug 16907: Make sure the log will be written only if the patron has been deleted

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Martin Renvoize 2016-10-13 15:37:37 UTC
Another tree bites the dust :)  Thanks Jonathan
Comment 17 Kyle M Hall 2016-10-21 16:59:58 UTC
Pushed to master for 16.11, thanks Jonathan!