fix(properties): include team Deal Stage values in the bulk loader - #6270
Conversation
The loader behind soup and search only returned system properties and tags. A customized team stores stage values on its own Deal Stage definition, so every board reload lost them. Return that definition too.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (7)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe properties crate now defines and re-exports the canonical CRM team stage name. The CRM crate re-exports the same constant. Filtered bulk property queries now include the viewer’s team CRM stage definition when the viewer is present. Fixtures and integration tests cover team-specific visibility, property options, explicit property requests, and missing viewers. A soup repository comment documents the expanded lookup behavior. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to Bulk property loading now preserves each viewer’s team-specific Deal Stage during company-card refreshes. The team-scoped lookup and covered edge cases indicate the change is ready to merge. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seanaye
left a comment
There was a problem hiding this comment.
Code changes seem fine but I'm not super familiar with CRM
@seanaye thx for stamp. I requested your review as it's mostly changes in the shared property loader that soup and search calls. |
CRM Stage moves on a customized team were lost on refresh. The property loader behind soup and search only returned system properties and tags, so values on the team's Deal Stage definition never reached the board and the company cards fell back to the old system Stage.
The loader now also returns the viewer's team Deal Stage definition.
Found while testing #6244 which would be unblocked by this.
Note
Medium Risk
Changes shared bulk property loading for Soup/CRM cards with team-based filtering; incorrect scoping could leak or hide stage data across teams.
Overview
Fixes custom CRM deal stages disappearing after refresh by extending the bulk filtered property read path used by Soup/search.
When a viewer user id is present,
get_bulk_entity_properties_values_filterednow returns the viewer’s team Deal Stage definition (non-system, single-selectSELECT_STRINGnamedCRM_TEAM_STAGE_DEFINITION_NAME), in addition to requested ids and visible TAG definitions. Matching is team-scoped viateam_user, so users only see their team’s pipeline—not another team’s stage on the same company.CRM_TEAM_STAGE_DEFINITION_NAME("Deal Stage") moves to thepropertiescrate and is re-exported for CRM. The sqlx snapshot for this query is regenerated; integration coverage uses a newteam_stagefixture.Reviewed by Cursor Bugbot for commit 991c540. Bugbot is set up for automated code reviews on this repo. Configure here.