Which invitation a dual-role member receives is decided by pass order, not product intent
还没有人认领这个 Issue。
评估
调研方向
从 PR #2867 和 find_or_create_invitation 中的邀请流程开始。阅读 Admin::InvitationController、Event#verified_students 和 Event#verified_coaches,了解 role、verified 和 attending 状态如何在角色切换过程中得到保留。Product 必须先决定哪个邀请优先,以及角色变更是否会重置状态;完成意味着已实现所选行为,并由现有 specs 提供保护。
由索引模型根据 Issue 内容生成。
描述
Summary
PR #2867 made (event/workshop, member) the invitation identity, so a member subscribed as both student and coach now receives exactly one invitation and one email. Which email that is depends on the invitation pass order: Coach first for events, Student first for workshops. The order is an implementation detail, not a product decision.
The specs in PR #2867 pin the surviving role and email subject, so a pass reorder cannot flip this silently — but if product wants, for example, the coach email to always win, that is a separate change.
Decision needed
For a member with both roles, which invitation should win?
- Keep pass order (current behavior: Coach for events, Student for workshops)
- Coach email always wins
- Student email always wins
Related: cleanup of existing duplicate rows (see companion issue), where the same "which one survives" question applies to historical rows.
Related design call (from the PR #2867 review): verified/attending state across role flips
The role flip carries verified and attending state across roles. Admin::InvitationController sets verified: true per row, and Event#verified_students / Event#verified_coaches select by role + accepted + verified. Consequence: a verified Coach invitation flipped to Student (via the self-RSVP role-choice-wins path in find_or_create_invitation) counts in verified_students with no admin action, and the coach-side verified record is gone. Under the old two-row design, verification stayed per role.
If product picks option 1 above (pass order), this needs no action. If product picks option 2 or 3, the flip direction should also decide whether a role change resets verified (and possibly attending).
Flagged by the ce-code-review run on PR #2867 (adversarial + correctness reviewers, confirmed by validation).
- 主要语言
- Ruby
- 星标
- 104
- 派生
- 205
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 67
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codebar/planner 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 5/5 一周以上 新手友好度 25/100
-
good first issue performance
难度 3/5 1-2 天 新手友好度 78/100
-
enhancement good first issue
难度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
googleapis/google-api-ruby-client#28001 · 5 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100