Files
erpnext/erpnext
Mihir Kandoi 7793e31e4e fix(projects): repair project_update daily_reminder and convert to ORM
daily_reminder/email_sending used raw frappe.db.sql with two portability
and correctness problems:

- The update query selected `progress` and `progress_details` from
  `tabProject Update`, but those columns do not exist on the Project
  Update doctype, so the query raised on BOTH MariaDB and Postgres
  (the function is whitelisted-only, so the bug was latent). Drop the
  non-existent columns and the corresponding "Project Status"/"Notes"
  cells from the summary table.
- `DATE_ADD(CURRENT_DATE, INTERVAL -1 DAY)` (MySQL-only) and a
  `CURRENT_DATE` Holiday lookup are not valid on Postgres.

Convert to ORM: frappe.get_all for Project/Project Update/Project User,
frappe.db.count for drafts, frappe.db.exists for the holiday check, and
add_days(today(), -1) for the date filter. Also str() the frequency in the
message so a NULL/empty frequency (Postgres returns None) does not raise.

Adds a test (the file was an empty stub) that creates a project + an update
dated yesterday and asserts the reminder finds it and runs end to end on
both engines.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 05:33:47 +05:30
..
2026-06-18 23:55:57 +05:30
2026-01-13 12:15:21 +05:30