Skip to content

fix(#550): always show RAC contact from first comment in contact details#551

Merged
need4deed merged 2 commits into
developfrom
fix/550-contact-details-from-comment
May 21, 2026
Merged

fix(#550): always show RAC contact from first comment in contact details#551
need4deed merged 2 commits into
developfrom
fix/550-contact-details-from-comment

Conversation

@nadavosa
Copy link
Copy Markdown
Collaborator

Summary

The Contact Details section was showing the agent's contact person (e.g. orphanage agent) instead of the actual RAC contact submitted via the public form.

The BE stores the form's contact data as the first comment in the format email<|>fullName<|>address<|>plz<|>phone. The parsing logic was already in place but only as a fallback for when opportunity.contact had no data — since every opportunity gets an orphanage agent with contact data, the comment was never reached.

Change: moved the comment-parsing block first so it always takes priority. Falls back to opportunity.contact only when no <|>-delimited comment exists.

Closes #550

Test plan

  • Open an opportunity created via the public form — Contact Details shows the RAC's name/phone/email from the comment, not the agent's
  • Open an opportunity with no <|> comment — Contact Details shows the agent contact as before

nadavosa and others added 2 commits May 21, 2026 17:07
Previously the <|>-delimited comment was only used as a fallback when
opportunity.contact had no data. Since every opportunity gets an
orphanage agent with contact data, the comment was never used.

Moved the comment-parsing check first so the RAC contact from the
public form always takes priority over the agent contact.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…comment

Contact details are now fully independent of the agent's Person record.
The section reads from the most recent <|>-delimited comment (the format
the public form uses).  On save, a coordinator's edit POSTs a new comment
the first time and PATCHes their own existing override comment on
subsequent edits, so address/plz from the original system comment are
preserved.  waysToContact removed — it has no place in the comment format
and was always empty when loaded from a comment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nadavosa nadavosa force-pushed the fix/550-contact-details-from-comment branch from 80fc2ea to 6ce692e Compare May 21, 2026 15:08
@need4deed need4deed merged commit d4dce69 into develop May 21, 2026
1 check passed
@need4deed need4deed deleted the fix/550-contact-details-from-comment branch May 21, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: contact details should always show RAC contact from first comment, not agent

2 participants