fix(#550): always show RAC contact from first comment in contact details#551
Merged
Conversation
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>
80fc2ea to
6ce692e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 whenopportunity.contacthad 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.contactonly when no<|>-delimited comment exists.Closes #550
Test plan
<|>comment — Contact Details shows the agent contact as before