Why only 3 emailed report per user?

Why only 3 emailed report per user ? Any way to change settings

“Any way to change settings”

One way to trace how or where, is to post the message thrown here Auto Email Report : Why there is limit for only three users

Already posted

There’s no settings for the same. It is hardcoded.

1 Like

We have a requirement to send Daily Auto emails to Our Manager, how can i accomplish it, if it restricted , any other alternative way
@michelle

Ah yes -

frappe@ubuntu:~/frappe-bench$ find . -name ‘*.py’ | xargs grep max_reports_per_user
./apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py:max_reports_per_user = frappe.local.conf.max_reports_per_user or 3
./apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py: if count > max_reports_per_user + (-1 if self.flags.in_insert else 0):
./apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py: frappe.throw(_(‘Only {0} emailed reports are allowed per user’).format(max_reports_per_user))

You could try this:

bench set-config max_reports_per_user 25

3 Likes

I tried this command - executed without error. However system continues to restrict max 3 reports per user. Do I need to undo the command? Is there a way to check bench config settings?

Hi this may help explain config settings somewhat How can I disable Auto Update System - #2 by clarkej

Thanks. Did the following command need to be applied to a specific site? Or it applies to all sites on the bench instance?

bench --site site1.local set-config max_reports_per_user 25

I couldn’t say, trial and error will inform you. Then note here what you determine!

Thank you for your suggestion. Did indeed run several trials and would like to share the proper format for doing this - as the bench set-config command does not work as reported earlier… To document (more for my future reference) - use the following commands:

find . -name '*.py' | xargs grep 'max_reports_per_user'

bench --site site1.local set-config max_reports_per_user 10

nano ./sites/site1.local/site_config.json and find line
"max_reports_per_user": "10" and remove “” from 10 so line looks like
"max_reports_per_user": 10

Note if line if followed by “,” leave that in place. You can also edit the site_config.json and insert the above line manually.
I also followed the above command with
sudo supervisorctl restart all and sudo systemctl restart nginx

Alternatively, to do this for all sites, you can insert the same line in ~/frappe-bench/sites/common_site_config.json

This worked for me. Thanks for pointing me in right direction.

3 Likes