Bug 21627

Summary: System preference for recipient emails of gather_print_notices.pl
Product: Koha Reporter: Joonas Kylmälä <joonas.kylmala>
Component: Command-line UtilitiesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: danielle, katrin.fischer, magnus, olli-antti.kivilahti, robin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Joonas Kylmälä 2018-10-22 10:23:38 UTC
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.
Comment 1 Olli-Antti Kivilahti 2018-10-22 10:37:26 UTC
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.
Comment 2 Joonas Kylmälä 2018-10-22 10:44:28 UTC
(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
Comment 3 Katrin Fischer 2018-10-28 17:35:30 UTC
> 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.
Comment 4 Danielle Elder 2018-12-06 17:16:41 UTC
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.
Comment 5 Danielle Elder 2018-12-06 17:17:22 UTC
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.
Comment 6 Magnus Enger 2019-12-17 14:59:28 UTC
(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?