[Koha-bugs] [Bug 25183] cleanup-database.pl --del-exp-selfreg fully deletes borrowers - should go into deleted-borrowers

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 16 10:03:32 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25183

--- Comment #18 from Julian Maurice <julian.maurice at biblibre.com> ---
Comment on attachment 119593
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119593
Bug 25183: Add option to cleanup-database.pl to move expired self registrations
to deleted borrowers table

Review of attachment 119593:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=25183&attachment=119593)
-----------------------------------------------------------------

::: misc/cronjobs/cleanup_database.pl
@@ +27,4 @@
>  use constant DEFAULT_SEARCHHISTORY_PURGEDAYS      => 30;
>  use constant DEFAULT_SHARE_INVITATION_EXPIRY_DAYS => 14;
>  use constant DEFAULT_DEBARMENTS_PURGEDAYS         => 30;
> +use constant DEFAULT_EXP_SELFREG_TYPE             => 'hard';

This is not used anywhere

@@ +167,4 @@
>      'restrictions:i'    => \$pDebarments,
>      'all-restrictions'  => \$allDebarments,
>      'del-exp-selfreg'   => \$pExpSelfReg,
> +    'del-exp-selfreg-type:s' => \$pExpSelfRegType,

':s' means the value is optional. In this case the value should be mandatory.
Use '=s' instead

@@ +229,4 @@
>      || $pPseudoTransactionsTo
>      || $pMessages
>      || defined $lock_days && $lock_days ne q{}
> +    || $pExpSelfRegType !~ m/^hard|soft$/

I guess this line is supposed to avoid giving wrong value for the parameter,
but it doesn't work. I was able to give --del-exp-selfreg-type foo without the
script complaining

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list