I think it would be nice if the librarians without shell access to the server could change the email address list that the gather_print_notices.pl cronjob uses to send emails to. Now the only way is to specify the --email option when running the script. I suggest a system preference for this that would have a comma separated list of emails.
We could have a syspref category 'cronjobs' and we could configure all the cronjobs there. Atleast the portions which make sense to configure via sysprefs. That should be most/all of them. Also what is needed is way to validate that the syspref values are valid. For ex. we use a lot of YAML-valued sysprefs. It would be important to be able to pop in a custom validation subroutine. Also syspref changes need to be logged. I recall there was some kind of a logging subsystem for sysprefs, and that may be sufficient.
(In reply to Olli-Antti Kivilahti from comment #1) > We could have a syspref category 'cronjobs' and we could configure all the > cronjobs there. Atleast the portions which make sense to configure via > sysprefs. That should be most/all of them. Great idea! > Also what is needed is way to validate that the syspref values are valid. > For ex. we use a lot of YAML-valued sysprefs. It would be important to be > able to pop in a custom validation subroutine. > > Also syspref changes need to be logged. I recall there was some kind of a > logging subsystem for sysprefs, and that may be sufficient. These should have their own reports. At least the first issue has already: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20930
> We could have a syspref category 'cronjobs' and we could configure all the > cronjobs there. Atleast the portions which make sense to configure via > sysprefs. That should be most/all of them. +1 And yes, system preference changes are loggged - saved me more than one time.
I would love to see the email address default to the branches.branchemail when the --split parameter is used.Otherwise I have to set up additional crons to send the individual notices to each branch e-mail. This gets very lengthy and can end up being dozens of crons for systems with multiple branches. I'd love to simplify this for multi-branch libraries.
(In reply to Danielle Elder from comment #5) > I would love to see the email address default to the branches.branchemail > when the --split parameter is used.Otherwise I have to set up additional > crons to send the individual notices to each branch e-mail. How do you do that? If you do --split and several --email, does not all the files get sent to all the addresses?
(In reply to Danielle Elder from comment #5) > I would love to see the email address default to the branches.branchemail > when the --split parameter is used.Otherwise I have to set up additional > crons to send the individual notices to each branch e-mail. This gets very > lengthy and can end up being dozens of crons for systems with multiple > branches. I'd love to simplify this for multi-branch libraries. Hi Danielle, I'm looking at the issue above and saw your comment. I'm curious about your circumstances if they are still relevant. Is this a security concern with sending all the files to all the branches or simply a quality of life issue with the branches not having to sort through the files for other branches to get the notices for their own? Either way I think it will be a little bit out of scope for this bug but can be its own separate issue which I can make after I address the original issue. Thanks! ~Imani
Created attachment 176339 [details] [review] Bug 21627: Add option to set emails for send_print_notices cronjob To test: 1. Apply Patch, updatedatabase, restart_all 2. go to misc/cronjobs/gather_print_notices.pl and uncomment line 77 which says `say $_ for @emails;` 3. from the misc/cronjobs folder run `perl gather_print_notices.pl -e dev@null.org -e any@other.email` 1. the emails you entered in the command line should be printed and nothing else 4. Search for the system preference 'SendPrintNoticesEmails' and set its value to a comma separated list of values 5. run gather_print_notices again and you should see the values you entered in the system preference instead of the ones you enter at the command line 6. search for the system preference SendPrintNoticesCombineEmails and set its value to 'in addition to' 7. run gather_print_notices again and you should see a combination of the command line emails and the emails you set in the SendPrintNoticesEmails system preference. 8. recomment line 77 in gather_print_notices.pl
Created attachment 176340 [details] [review] Bug 21627: Add SendPrintNoticesCombineEmails and SendPrintNoticesEmails system preferences.
Dani's comment is still relevant. Large library systems have a need for the cron to split and send notice files to the library email matching the patron home library. The primary need is simplicity for libraries (not having to sort through for their files). Some libraries do limit patron visibility by library or library group for patron data security. Some library systems will have a security want or need for separated files.