Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HR Settings: reminders cannot be turned off (solution included) #27450

Closed
zongo811 opened this issue Sep 13, 2021 · 1 comment
Closed

HR Settings: reminders cannot be turned off (solution included) #27450

zongo811 opened this issue Sep 13, 2021 · 1 comment
Labels

Comments

@zongo811
Copy link

Description of the issue

When you turn off Reminders in "HR > Settings" they are sent anyway. Affects reminders for Birthday, Work Anniversaries & Holidays.

Context information (for bug reports)

Reason for this is in the way the values of the Check-fields are read in apps/erpnext/erpnext/hr/doctype/employee/employee_reminders.py:

	to_send = int(frappe.db.get_single_value("HR Settings", "send_birthday_reminders") or 1)
	if not to_send:
		return

Should be

	to_send = int(frappe.db.get_single_value("HR Settings", "send_birthday_reminders") or 0)

because currently to_send always contains 1 (true) regardless of the value read from the DB.
Apply this fix to all lines with "to_send = int(frappe.db.get_single_value("HR Settings"..."

Output of bench version

erpnext 13.10.2
frappe 13.10.0

Steps to reproduce the issue

  1. Set the birthday of an Employee so it happens today
  2. In "HR Settings" disable birthday reminder
  3. Run apps/erpnext/erpnext/hr/doctype/employee/employee_reminders.py

Observed result

Birtday reminder is send.

Expected result

Birtday reminder is not send.

Stacktrace / full error message

-

Additional information

OS version / distribution: Debain Buster

@zongo811 zongo811 added the bug label Sep 13, 2021
@ankush
Copy link
Member

ankush commented Sep 13, 2021

Duplicate #27448
Fixed here #27365

Part of next release.

@ankush ankush closed this as completed Sep 13, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants