Bug 31156 - Document borrowers-force-messaging-defaults.pl in cronjobs chapter
Summary: Document borrowers-force-messaging-defaults.pl in cronjobs chapter
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Documentation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Caroline Cyr La Rose
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-14 14:07 UTC by Caroline Cyr La Rose
Modified: 2023-06-08 22:26 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/572
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2022-07-14 14:07:01 UTC
I don't know if it can be considered a cronjob, it's mostly a command-line utility used once, afaik, but I've had to use it as a cronjob for a client who regularly imports borrowers.

It is not in the manual at all, and I had trouble finding information on all the options.

=head1 SYNOPSIS

  borrowers-force-messaging-defaults.pl
  borrowers-force-messaging-defaults.pl --help
  borrowers-force-messaging-defaults.pl --doit
  borrowers-force-messaging-defaults.pl --doit --not-expired
  borrowers-force-messaging-defaults.pl --doit --category PT

=head1 DESCRIPTION

If the EnhancedMessagingPreferences syspref is enabled after borrowers have
been created in the DB, those borrowers won't have messaging transport
preferences default values as defined for their borrower category. So you would
have to modify each borrower one by one if you would like to send them 'Hold
Filled' notice for example.

This script creates/overwrites messaging preferences for all borrowers and sets
them to default values defined for the category they belong to (unless you
use the options -not-expired or -no-overwrite to update a subset).

=over 8

=item B<--help>

Prints this help

=item B<--doit>

Actually update the borrowers.

=item B<--not-expired>

Will only update active borrowers (borrowers who didn't pass their expiration date).

=item B<--no-overwrite>

Will only update patrons without messaging preferences and skip patrons that
already set their preferences.

=item B<--category>

Will only update patrons in the category specified.

See also Bug 31155 for --since option
Comment 1 Caroline Cyr La Rose 2022-07-14 16:26:44 UTC
Created merge request
https://gitlab.com/koha-community/koha-manual/-/merge_requests/572
Comment 2 Martin Renvoize 2022-09-16 12:48:55 UTC
I reviewed this on gitlab and have now merged it.