Bug 37845 - Remove C4::Members::DeleteExpiredOpacRegistrations
Summary: Remove C4::Members::DeleteExpiredOpacRegistrations
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on: 37844 13049
Blocks: 16846
  Show dependency treegraph
 
Reported: 2024-09-05 14:53 UTC by Jonathan Druart
Modified: 2024-09-26 18:46 UTC (History)
4 users (show)

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


Attachments
Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations (13.51 KB, patch)
2024-09-09 14:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations (14.22 KB, patch)
2024-09-09 14:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations (14.28 KB, patch)
2024-09-26 17:58 UTC, Sukhmandeep
Details | Diff | Splinter Review
Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations (14.36 KB, patch)
2024-09-26 18:46 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-09-05 14:53:49 UTC

    
Comment 1 Jonathan Druart 2024-09-09 14:00:31 UTC
Created attachment 171201 [details] [review]
Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations

This patch remove the subroutine C4::Members::DeleteExpiredOpacRegistrations.
The code is moved and adjusted to Koha::Patrons.
We now have 2 new methods:
  Koha::Patrons->filter_by_expired_opac_registrations
  Koha::Patrons->filter_by_safe_to_delete

Test plan:
Run the misc/cronjobs/cleanup_database.pl script with the

Improve the output of the verbose mode
Tell if the something is wrong in the config (syspref not set)
Comment 2 Jonathan Druart 2024-09-09 14:05:02 UTC
Created attachment 171202 [details] [review]
Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations

This patch remove the subroutine C4::Members::DeleteExpiredOpacRegistrations.
The code is moved and adjusted to Koha::Patrons.
We now have 2 new methods:
  Koha::Patrons->filter_by_expired_opac_registrations
  Koha::Patrons->filter_by_safe_to_delete

Test plan:
Run the misc/cronjobs/cleanup_database.pl script with the
--del-exp-selfreg (as well as --verbose and --confirm) and confirm that
it behaves as expected

Note that it improve the output of the verbose mode and now tell if the something
is wrong with the config (syspref not set)
Comment 3 Jonathan Druart 2024-09-10 07:36:58 UTC
(In reply to Jonathan Druart from comment #2)
> Test plan:
> Run the misc/cronjobs/cleanup_database.pl script with the
> --del-exp-selfreg (as well as --verbose and --confirm) and confirm that
> it behaves as expected

I should have noted that there is a behaviour change here. Prior to this patch we only tested if the patron had checkouts and an account balance. Now we are relying on Koha::Patron->safe_to_delete that is doing much more tests (not anonymous patron, not protected, not a guarantor). That should not happen for self registration entries anyway, but this is a better test IMO.
Comment 4 Sukhmandeep 2024-09-26 17:58:37 UTC
Created attachment 171999 [details] [review]
Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations

This patch remove the subroutine C4::Members::DeleteExpiredOpacRegistrations.
The code is moved and adjusted to Koha::Patrons.
We now have 2 new methods:
  Koha::Patrons->filter_by_expired_opac_registrations
  Koha::Patrons->filter_by_safe_to_delete

Test plan:
Run the misc/cronjobs/cleanup_database.pl script with the
--del-exp-selfreg (as well as --verbose and --confirm) and confirm that
it behaves as expected

Note that it improve the output of the verbose mode and now tell if the something
is wrong with the config (syspref not set)

Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Comment 5 Kyle M Hall (khall) 2024-09-26 18:46:48 UTC
Created attachment 172015 [details] [review]
Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations

This patch remove the subroutine C4::Members::DeleteExpiredOpacRegistrations.
The code is moved and adjusted to Koha::Patrons.
We now have 2 new methods:
  Koha::Patrons->filter_by_expired_opac_registrations
  Koha::Patrons->filter_by_safe_to_delete

Test plan:
Run the misc/cronjobs/cleanup_database.pl script with the
--del-exp-selfreg (as well as --verbose and --confirm) and confirm that
it behaves as expected

Note that it improve the output of the verbose mode and now tell if the something
is wrong with the config (syspref not set)

Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>