Bug 16907 - Move DelMember and HandleDelBorrower to Koha::Patron
Summary: Move DelMember and HandleDelBorrower to Koha::Patron
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 16890 16891
Blocks: 16846
  Show dependency treegraph
 
Reported: 2016-07-12 18:06 UTC by Jonathan Druart
Modified: 2017-06-14 22:15 UTC (History)
3 users (show)

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


Attachments
Bug 16907: Koha::Patrons - Move DelMember to ->delete (12.13 KB, patch)
2016-07-12 18:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete (8.51 KB, patch)
2016-07-12 18:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16907: Koha::Patrons - Move DelMember to ->delete (12.01 KB, patch)
2016-07-20 14:14 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete (8.51 KB, patch)
2016-07-20 14:14 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16907: Make sure the log will be written only if the patron has been deleted (976 bytes, patch)
2016-08-09 09:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16907: Koha::Patrons - Move DelMember to ->delete (12.07 KB, patch)
2016-08-12 22:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete (8.56 KB, patch)
2016-08-12 22:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16907: Make sure the log will be written only if the patron has been deleted (1.01 KB, patch)
2016-08-12 22:51 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16907: Koha::Patrons - Move DelMember to ->delete (12.17 KB, patch)
2016-10-13 10:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete (8.44 KB, patch)
2016-10-13 10:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16907: Make sure the log will be written only if the patron has been deleted (1.01 KB, patch)
2016-10-13 10:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 16907: Koha::Patrons - Move DelMember to ->delete (12.25 KB, patch)
2016-10-13 15:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
[PASSED QA] Bug 16907: Koha::Patrons - Move HandleDelBorrower to ->delete (8.51 KB, patch)
2016-10-13 15:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
[PASSED QA] Bug 16907: Make sure the log will be written only if the patron has been deleted (1.08 KB, patch)
2016-10-13 15:36 UTC, Martin Renvoize
Details | Diff | Splinter Review

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