Bug 28688 - Automatically renew patron membership
Summary: Automatically renew patron membership
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on: 33245 33522
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-08 13:50 UTC by Jessie Zairo
Modified: 2023-12-20 19:42 UTC (History)
17 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/799
Text to go in the release notes:
This patch set allows you to renew patrons automatically when running the membership_expiry.pl cron job. You can pass filters to do this only on selected patrons, like active patrons, etc. Default behavior does not change.
Version(s) released in:
23.11.00
Circulation function:


Attachments
Bug 28688: Add new notice MEMBERSHIP_RENEWED (2.94 KB, patch)
2023-06-15 12:58 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Add renew option to membership_expiry.pl (5.64 KB, patch)
2023-06-15 12:58 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Allow to pass another renewal notice (3.88 KB, patch)
2023-06-15 12:59 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Add renewal to crontab example (1.38 KB, patch)
2023-06-15 12:59 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Add new notice MEMBERSHIP_RENEWED (2.98 KB, patch)
2023-09-02 12:37 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Add renew option to membership_expiry.pl (5.52 KB, patch)
2023-09-02 12:37 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Allow to pass another renewal notice (3.86 KB, patch)
2023-09-02 12:37 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Add renewal to crontab example (1.38 KB, patch)
2023-09-02 12:37 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Add new notice MEMBERSHIP_RENEWED (2.99 KB, patch)
2023-09-05 14:42 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 28688: Add renew option to membership_expiry.pl (5.53 KB, patch)
2023-09-05 14:42 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 28688: Allow to pass another renewal notice (3.88 KB, patch)
2023-09-05 14:42 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 28688: Add renewal to crontab example (1.39 KB, patch)
2023-09-05 14:42 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 28688: Add new notice MEMBERSHIP_RENEWED (3.22 KB, patch)
2023-10-04 11:50 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Add renew option to membership_expiry.pl (5.33 KB, patch)
2023-10-04 11:50 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Allow to pass another renewal notice (3.74 KB, patch)
2023-10-04 11:50 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Add renewal to crontab example (1.43 KB, patch)
2023-10-04 11:50 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 28688: Add new notice MEMBERSHIP_RENEWED (3.25 KB, patch)
2023-10-04 13:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28688: Add renew option to membership_expiry.pl (5.37 KB, patch)
2023-10-04 13:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28688: Allow to pass another renewal notice (3.77 KB, patch)
2023-10-04 13:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28688: Add renewal to crontab example (1.47 KB, patch)
2023-10-04 13:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28688: Use pod2usage for incorrect usage (1.13 KB, patch)
2023-10-04 13:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28688: (follow-up) Remove redundant options (2.30 KB, patch)
2023-10-04 13:43 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jessie Zairo 2021-07-08 13:50:19 UTC
When membership renewals come up for a patron, it would be useful for libraries to make a decision about automatic renewals of membership, based on current activity at the library. This would be a benefit/advantage for users who don't come into the physical branch but use curbside or electronic services. If Koha could look at borrowers.lastseen - last time a patron has been seen (connected at the OPAC or staff interface), this could be used as a way to identify that activity and renew the patron accordingly. 

In addition, if a library uses TrackLastPatronActivity the borrowers.lastseen date could also identify when a patron is using SIP-related connections. 

It would be great to have a system preference that would allow you to turn this function on or off for libraries who want patrons to come in to renew membership (ie show driver's license for mail verifying address). 

It would also be great to have a tie-in notice that automatically notifies them when they have been renewed!
Comment 1 George Williams (NEKLS) 2021-07-13 14:05:57 UTC
I agree.  I think this is a great idea so long as there is some kind of system preference to turn it on or off.  Even better, though, would be to make it part of the circulation rules so that it could be turned on or off based on the borrower's home library or part of the patron category configuration so it could be turned on or off based on a borrower's category.
Comment 2 David Cook 2021-07-13 23:49:11 UTC
I like the sound of this. 

(It makes me wonder if all my library cards have expired since I haven't been to a public library since 2019 thanks to the pandemic*.)

*I wonder if we'll look back one day on these Bugzilla comments and say "oh right... we did have a pandemic back then..."
Comment 3 saylett 2022-03-02 19:09:00 UTC
This would be a great feature. We field countless calls/texts/emails from active patrons needing to renew their accounts. We've discussed extending the renewal period, but having it auto-renew based on activity would be much better.
Comment 4 Marcel de Rooy 2022-09-28 11:21:20 UTC
Great idea. Is borrowers.lastseen the best way to detect activity, or should we look at holds or issues or ..?
Comment 5 Marcel de Rooy 2023-05-30 14:31:03 UTC
(In reply to Marcel de Rooy from comment #4)
> Great idea. Is borrowers.lastseen the best way to detect activity, or should
> we look at holds or issues or ..?

Bug 33245 provides a base for this. You can do $patron->is_active({ months => 6 }) or something and continue.

The is_active method looks at datelastseen, enrollment date, expiry date, anonymized status, and recent holds, issues and article requests.
Comment 6 Marcel de Rooy 2023-05-30 15:03:49 UTC
Note that bug 33522 provides another perspective: do not send expiry notices to inactive patrons. Might feel a bit less friendly, but could be an option too.
Comment 7 Marcel de Rooy 2023-06-01 09:58:21 UTC
(In reply to Marcel de Rooy from comment #6)
> Note that bug 33522 provides another perspective: do not send expiry notices
> to inactive patrons. Might feel a bit less friendly, but could be an option
> too.

Decided to put this one on top of 33522.
Comment 8 Marcel de Rooy 2023-06-15 12:58:55 UTC
Created attachment 152378 [details] [review]
Bug 28688: Add new notice MEMBERSHIP_RENEWED

Test plan:
Run new install or upgrade.
Check for this notice under Tools/Notices.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2023-06-15 12:58:58 UTC
Created attachment 152379 [details] [review]
Bug 28688: Add renew option to membership_expiry.pl

Test plan:
[1] Pick an account to expire soon.
[2] Choose MembershipExpiryDaysNotice so that it will be selected.
    (Note: You can extend the selection with -before or -after.)
[3] Run misc/cronjobs/membership_expiry.pl -c -v -renew
[4] Check new expiry date in the notice. Does it correspond with
    enrollment period of category and pref BorrowerRenewalPeriodBase?
[5] If the patron category has an enrollment fee, check account too.
[6] Reset dateexpiry of this patron to original date.
[7] Run misc/cronjobs/membership_expiry.pl -c -v
[8] Check if you got an expiry notice instead and dateexpiry did not
    change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2023-06-15 12:59:00 UTC
Created attachment 152380 [details] [review]
Bug 28688: Allow to pass another renewal notice

Just as passing another expiry notice.

Test plan:
Pick a patron to expire.
Create another membership renewal notice, say X.
Run misc/cronjobs/membership_expiry.pl -c -n -v -letter_renew X
Check output on command line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Marcel de Rooy 2023-06-15 12:59:03 UTC
Created attachment 152381 [details] [review]
Bug 28688: Add renewal to crontab example

Note: I did not add an example to the debian cron daily file, since
we have no commented lines there. And automatic renewal is no default
behavior.

Test plan:
Read new lines in misc/cronjobs/crontab.example. Just comments.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 12 Lucas Gass (lukeg) 2023-08-17 20:57:03 UTC
This works and see the contens of the MEMBERSHIP_RENEWED notice in the command line output. However I don't see the MEMBERSHIP_RENEWED notice in the message_queue. 

Ive tried with the default notice MEMEBERSHIP_RENEWED ( /misc/cronjobs/membership_expiry.pl -c -n -v -letter_renew MEMBERSHIP_RENEWED -renew )

and with a custom notice called X ( /misc/cronjobs/membership_expiry.pl -c -n -v -letter_renew X -renew )
Comment 13 Marcel de Rooy 2023-08-25 06:57:05 UTC
(In reply to Lucas Gass from comment #12)
> This works and see the contens of the MEMBERSHIP_RENEWED notice in the
> command line output. However I don't see the MEMBERSHIP_RENEWED notice in
> the message_queue. 
> 
> Ive tried with the default notice MEMEBERSHIP_RENEWED (
> /misc/cronjobs/membership_expiry.pl -c -n -v -letter_renew
> MEMBERSHIP_RENEWED -renew )
> 
> and with a custom notice called X ( /misc/cronjobs/membership_expiry.pl -c
> -n -v -letter_renew X -renew )

Thanks for testing, Lucas.
I cannot reproduce this. I do see the notices in the message queue.
I assume that you installed the dbrev, since you see output on the cmdline. Did you check if the patrons have a working email address?
Comment 14 Marcel de Rooy 2023-09-02 12:37:05 UTC
Created attachment 155170 [details] [review]
Bug 28688: Add new notice MEMBERSHIP_RENEWED

Test plan:
Run new install or upgrade.
Check for this notice under Tools/Notices.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 15 Marcel de Rooy 2023-09-02 12:37:08 UTC
Created attachment 155171 [details] [review]
Bug 28688: Add renew option to membership_expiry.pl

Test plan:
[1] Pick an account to expire soon.
[2] Choose MembershipExpiryDaysNotice so that it will be selected.
    (Note: You can extend the selection with -before or -after.)
[3] Run misc/cronjobs/membership_expiry.pl -c -v -renew
[4] Check new expiry date in the notice. Does it correspond with
    enrollment period of category and pref BorrowerRenewalPeriodBase?
[5] If the patron category has an enrollment fee, check account too.
[6] Reset dateexpiry of this patron to original date.
[7] Run misc/cronjobs/membership_expiry.pl -c -v
[8] Check if you got an expiry notice instead and dateexpiry did not
    change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 16 Marcel de Rooy 2023-09-02 12:37:11 UTC
Created attachment 155172 [details] [review]
Bug 28688: Allow to pass another renewal notice

Just as passing another expiry notice.

Test plan:
Pick a patron to expire.
Create another membership renewal notice, say X.
Run misc/cronjobs/membership_expiry.pl -c -n -v -letter_renew X
Check output on command line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 17 Marcel de Rooy 2023-09-02 12:37:14 UTC
Created attachment 155173 [details] [review]
Bug 28688: Add renewal to crontab example

Note: I did not add an example to the debian cron daily file, since
we have no commented lines there. And automatic renewal is no default
behavior.

Test plan:
Read new lines in misc/cronjobs/crontab.example. Just comments.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 18 Marcel de Rooy 2023-09-02 12:38:15 UTC
Rebased on top of 33245/33522.

PLEASE test !
Comment 19 Lucas Gass (lukeg) 2023-09-05 14:42:02 UTC
Created attachment 155222 [details] [review]
Bug 28688: Add new notice MEMBERSHIP_RENEWED

Test plan:
Run new install or upgrade.
Check for this notice under Tools/Notices.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 20 Lucas Gass (lukeg) 2023-09-05 14:42:06 UTC
Created attachment 155223 [details] [review]
Bug 28688: Add renew option to membership_expiry.pl

Test plan:
[1] Pick an account to expire soon.
[2] Choose MembershipExpiryDaysNotice so that it will be selected.
    (Note: You can extend the selection with -before or -after.)
[3] Run misc/cronjobs/membership_expiry.pl -c -v -renew
[4] Check new expiry date in the notice. Does it correspond with
    enrollment period of category and pref BorrowerRenewalPeriodBase?
[5] If the patron category has an enrollment fee, check account too.
[6] Reset dateexpiry of this patron to original date.
[7] Run misc/cronjobs/membership_expiry.pl -c -v
[8] Check if you got an expiry notice instead and dateexpiry did not
    change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 21 Lucas Gass (lukeg) 2023-09-05 14:42:11 UTC
Created attachment 155224 [details] [review]
Bug 28688: Allow to pass another renewal notice

Just as passing another expiry notice.

Test plan:
Pick a patron to expire.
Create another membership renewal notice, say X.
Run misc/cronjobs/membership_expiry.pl -c -n -v -letter_renew X
Check output on command line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 22 Lucas Gass (lukeg) 2023-09-05 14:42:15 UTC
Created attachment 155225 [details] [review]
Bug 28688: Add renewal to crontab example

Note: I did not add an example to the debian cron daily file, since
we have no commented lines there. And automatic renewal is no default
behavior.

Test plan:
Read new lines in misc/cronjobs/crontab.example. Just comments.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 23 Marcel de Rooy 2023-09-05 14:45:43 UTC
(In reply to Lucas Gass from comment #22)
> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Great!
Comment 24 Kristi 2023-10-02 19:09:23 UTC
I see this is signed off. This is a system preference our library branches are eager to see in place.
Comment 25 Jonathan Druart 2023-10-04 09:22:30 UTC
I think we should move the logic enrollment_fee logic to the notice template

+        $fees->{$recent->branchcode} = $recent->category->enrolmentfee if !exists $fees->{$recent->branchcode};
+        $substitute->{enrollment_fee} = $fees->{$recent->branchcode} if $fees->{$recent->branchcode} > 0;

It can be [% patron.category.enrolmentfee %], and we don't add black magic.
Comment 26 Jonathan Druart 2023-10-04 09:28:34 UTC
Hum, and why are you using the branchcode as the key of $fees?
Comment 27 Jonathan Druart 2023-10-04 09:41:28 UTC
Please clarify.
Comment 28 Marcel de Rooy 2023-10-04 10:45:33 UTC
(In reply to Jonathan Druart from comment #26)
> Hum, and why are you using the branchcode as the key of $fees?

Thats a good question. It seems to be a typo. I do not recall another reason right now.
Comment 29 Marcel de Rooy 2023-10-04 10:46:04 UTC
(In reply to Jonathan Druart from comment #25)
> I think we should move the logic enrollment_fee logic to the notice template
> 
> +        $fees->{$recent->branchcode} = $recent->category->enrolmentfee if
> !exists $fees->{$recent->branchcode};
> +        $substitute->{enrollment_fee} = $fees->{$recent->branchcode} if
> $fees->{$recent->branchcode} > 0;
> 
> It can be [% patron.category.enrolmentfee %], and we don't add black magic.

Will have a look.
Comment 30 Marcel de Rooy 2023-10-04 11:49:16 UTC
Nice that both enrollmentfee and enrolment fee are correct spellings.. Please ignore that inconsistency here.
Comment 31 Marcel de Rooy 2023-10-04 11:50:29 UTC
Created attachment 156522 [details] [review]
Bug 28688: Add new notice MEMBERSHIP_RENEWED

Test plan:
Run new install or upgrade.
Check for this notice under Tools/Notices.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Enrollment fee via object instead of substitute hash.
Comment 32 Marcel de Rooy 2023-10-04 11:50:32 UTC
Created attachment 156523 [details] [review]
Bug 28688: Add renew option to membership_expiry.pl

Test plan:
[1] Pick an account to expire soon.
[2] Choose MembershipExpiryDaysNotice so that it will be selected.
    (Note: You can extend the selection with -before or -after.)
[3] Run misc/cronjobs/membership_expiry.pl -c -v -renew
[4] Check new expiry date in the notice. Does it correspond with
    enrollment period of category and pref BorrowerRenewalPeriodBase?
[5] If the patron category has an enrollment fee, check account too.
[6] Reset dateexpiry of this patron to original date.
[7] Run misc/cronjobs/membership_expiry.pl -c -v
[8] Check if you got an expiry notice instead and dateexpiry did not
    change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed $fees and $substitute in favor of notice approach
Comment 33 Marcel de Rooy 2023-10-04 11:50:35 UTC
Created attachment 156524 [details] [review]
Bug 28688: Allow to pass another renewal notice

Just as passing another expiry notice.

Test plan:
Pick a patron to expire.
Create another membership renewal notice, say X.
Run misc/cronjobs/membership_expiry.pl -c -n -v -letter_renew X
Check output on command line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 34 Marcel de Rooy 2023-10-04 11:50:39 UTC
Created attachment 156525 [details] [review]
Bug 28688: Add renewal to crontab example

Note: I did not add an example to the debian cron daily file, since
we have no commented lines there. And automatic renewal is no default
behavior.

Test plan:
Read new lines in misc/cronjobs/crontab.example. Just comments.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 35 Marcel de Rooy 2023-10-04 11:51:53 UTC
(In reply to Jonathan Druart from comment #25)
> I think we should move the logic enrollment_fee logic to the notice template
> 
> +        $fees->{$recent->branchcode} = $recent->category->enrolmentfee if
> !exists $fees->{$recent->branchcode};
> +        $substitute->{enrollment_fee} = $fees->{$recent->branchcode} if
> $fees->{$recent->branchcode} > 0;
> 
> It can be [% patron.category.enrolmentfee %], and we don't add black magic.

Removed the $fees and $substitute construct now and moved it to the notice.
Comment 36 Marcel de Rooy 2023-10-04 11:54:22 UTC
New test result:

+------------+-----------+----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------------------+------------------------+---------+---------------------+---------------------+------------+-----------------------------+---------------+--------------+--------------+
| message_id | letter_id | borrowernumber | subject         | content                                                                                                                                                                                | metadata | letter_code        | message_transport_type | status  | time_queued         | updated_on          | to_address | from_address                | reply_address | content_type | failure_code |
+------------+-----------+----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------------------+------------------------+---------+---------------------+---------------------+------------+-----------------------------+---------------+--------------+--------------+
|        513 |       173 |             50 | Account renewal | Dear  Tommy Peters,

Your library account has been renewed. The new expiry date is: 2032-01-04.

An enrollment fee of $12.35 has been applied.

Thank you,

Your library,

Springfield |          | MEMBERSHIP_RENEWED | email                  | pending | 2023-10-04 11:47:28 | 2023-10-04 11:47:28 | NULL       | noreply@master.rijkskoha.nl | NULL          | NULL         |              |
+------------+-----------+----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------------------+------------------------+---------+---------------------+---------------------+------------+-----------------------------+---------------+--------------+--------------+
Comment 37 Jonathan Druart 2023-10-04 13:05:08 UTC
Created attachment 156533 [details] [review]
Bug 28688: Add new notice MEMBERSHIP_RENEWED

Test plan:
Run new install or upgrade.
Check for this notice under Tools/Notices.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Enrollment fee via object instead of substitute hash.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 38 Jonathan Druart 2023-10-04 13:05:11 UTC
Created attachment 156534 [details] [review]
Bug 28688: Add renew option to membership_expiry.pl

Test plan:
[1] Pick an account to expire soon.
[2] Choose MembershipExpiryDaysNotice so that it will be selected.
    (Note: You can extend the selection with -before or -after.)
[3] Run misc/cronjobs/membership_expiry.pl -c -v -renew
[4] Check new expiry date in the notice. Does it correspond with
    enrollment period of category and pref BorrowerRenewalPeriodBase?
[5] If the patron category has an enrollment fee, check account too.
[6] Reset dateexpiry of this patron to original date.
[7] Run misc/cronjobs/membership_expiry.pl -c -v
[8] Check if you got an expiry notice instead and dateexpiry did not
    change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed $fees and $substitute in favor of notice approach

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 39 Jonathan Druart 2023-10-04 13:05:15 UTC
Created attachment 156535 [details] [review]
Bug 28688: Allow to pass another renewal notice

Just as passing another expiry notice.

Test plan:
Pick a patron to expire.
Create another membership renewal notice, say X.
Run misc/cronjobs/membership_expiry.pl -c -n -v -letter_renew X
Check output on command line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 40 Jonathan Druart 2023-10-04 13:05:18 UTC
Created attachment 156536 [details] [review]
Bug 28688: Add renewal to crontab example

Note: I did not add an example to the debian cron daily file, since
we have no commented lines there. And automatic renewal is no default
behavior.

Test plan:
Read new lines in misc/cronjobs/crontab.example. Just comments.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 41 Jonathan Druart 2023-10-04 13:05:22 UTC
Created attachment 156537 [details] [review]
Bug 28688: Use pod2usage for incorrect usage

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 42 Marcel de Rooy 2023-10-04 13:26:44 UTC
(In reply to Jonathan Druart from comment #41)
> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Great! Thanks
Comment 43 Jonathan Druart 2023-10-04 13:28:42 UTC
(Note that we should remove the Options part from the SYNOPSIS, it's redundant when you get the help message).
Comment 44 Marcel de Rooy 2023-10-04 13:43:04 UTC
Created attachment 156540 [details] [review]
Bug 28688: (follow-up) Remove redundant options

Test plan:
Run misc/cronjobs/membership_expiry.pl --help
misc/cronjobs/membership_expiry.pl --man

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 45 Tomás Cohen Arazi (tcohen) 2023-10-10 12:23:04 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 46 Fridolin Somers 2023-10-12 20:32:41 UTC
Enhancement not pushed to 23.05.x
Comment 47 Kristi 2023-10-13 15:51:45 UTC
We are very excited about this update! Any possibility of backporting the update to 22.11?
Comment 48 Katrin Fischer 2023-10-13 17:04:22 UTC
(In reply to Kristi from comment #47)
> We are very excited about this update! Any possibility of backporting the
> update to 22.11?

Hi Kristi, this is a new feature, inluding a new notice, and as such should not be backported to stable versions. This is also Frido as Rmaint of 23.05 decided and then it cannot go into even lower versions (waterfall principle).
Comment 49 Fridolin Somers 2023-10-28 20:51:55 UTC
Indeed, lots of changes here.
This may introduce bugs in stable versions.

23.11 will be release soon :D