Skip to content

fix: prefill "To" when composing email on proposal doctypes - #293

Merged
harshtandiya merged 1 commit into
developfrom
fix/prefill-email-recipients-on-proposals
Jul 28, 2026
Merged

fix: prefill "To" when composing email on proposal doctypes#293
harshtandiya merged 1 commit into
developfrom
fix/prefill-email-recipients-on-proposals

Conversation

@harshtandiya

Copy link
Copy Markdown
Collaborator

Closes#246

Clicking "New Email" on a proposal doctype opened the composer with an empty "To" field.

Frappe's composer resolves the default recipient through the form's get_email_recipients(frm, fieldname) handler (frappe/public/js/frappe/views/communication.js), falling back to frm.email_field / doc.email_id / doc.email. The proposal doctypes define none of these, so nothing was prefilled.

Each doctype now defines the handler:

  • Talk Proposal — every email in the speakers child table, the only place addresses are stored. Proposal Speaker.email is mandatory, so there is always at least one.
  • Event Proposal — the submitting user. Guest submissions leave owner as "Guest", which is skipped.
  • Sponsorship Enquiry — the submitting user, matching the recipients the controller already notifies.

No schema changes, no patch, no migration.

Verified manually in desk: the composer opens with "To" populated.

🤖 Generated with Claude Code

Frappe's communication composer resolves the recipient from the form's
get_email_recipients handler, which none of the proposal doctypes defined,
so the "To" field opened empty.
Talk Proposal sources recipients from the speakers child table, the only
place emails are stored. Event Proposal and Sponsorship Enquiry carry no
contact email, so both fall back to the submitting user.
Closes#246
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@harshtandiyaharshtandiya added the backport main backport to main branch label Jul 28, 2026
@harshtandiya
harshtandiya merged commit a79850b into developJul 28, 2026
8 checks passed
@harshtandiya
harshtandiya deleted the fix/prefill-email-recipients-on-proposals branch July 28, 2026 11:56
@github-actions

Copy link
Copy Markdown
Contributor

Successfully created backport PR for main:

samkit5495 pushed a commit to Klaimify/buzz that referenced this pull request Jul 28, 2026
)
fix: prefill "To" when composing email on proposal doctypes (bwhtech#293)
Frappe's communication composer resolves the recipient from the form's
get_email_recipients handler, which none of the proposal doctypes defined,
so the "To" field opened empty.
Talk Proposal sources recipients from the speakers child table, the only
place emails are stored. Event Proposal and Sponsorship Enquiry carry no
contact email, so both fall back to the submitting user.
Closesbwhtech#246
(cherry picked from commit a79850b)
Co-authored-by: Harsh Tandiya <harsh.tandiya@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport mainbackport to main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"New Email" recipient not auto-populated on proposal doctypes

1 participant

@harshtandiya