Backfill facilitator affiliation start dates from legacy member_since
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
先从 app/decorators/person_decorator.rb 和 facilitator_since_date fallback 开始,然后检查 issue 中提到的 affiliation 开始日期检查。在实现带有 dry-run 报告的幂等 migration 或 rake task 之前,定义冲突处理方式并检查相关的 organization fallback。完成的标准是:补齐缺失的日期且不覆盖已有日期,报告可供审查,并重新评估 fallback 和警告。
由索引模型根据 Issue 内容生成。
描述
Problem
Facilitator start dates now come from affiliation records, but the profile/decorator still falls back to the legacy member_since column when a Facilitator affiliation has no start_date:
PersonDecorator#facilitator_since_date→affiliations.facilitators.minimum(:start_date) || member_since(app/decorators/person_decorator.rb).
So where a facilitator's affiliations are missing start dates, the displayed "Facilitator since" is driven by member_since rather than the affiliation data. The edit form already flags the mismatch (member_since_earlier_than_facilitator_affiliations? / member_since_differs_from_facilitator_affiliations?), which shows these two sources disagree in production data.
The result: the affiliation records and the profile displays can be out of sync, and the "Affiliated since" grey note (added in #2280) only reads correctly once affiliation dates are trustworthy.
Goal
Make the affiliation data the single source of truth so member_since is no longer needed as a fallback for facilitators.
Scope / questions to settle
- Backfill direction: for facilitators whose
Facilitatoraffiliation(s) have a blankstart_date, populate it frommember_since(the earliest sensible value). - Conflicts: decide what to do when
member_sinceis earlier than or differs from an existing affiliation start date — earlier likely means an affiliation record is missing that stretch; a plain difference may just be legacy noise. Don't clobber real affiliation start dates. - Idempotent migration/rake task with a dry-run report of what would change (counts of: blank→filled, member_since earlier than all facilitator affiliations, member_since differs), reviewable before running against prod.
- After backfill: confirm the
member_sincefallback infacilitator_since_datecan be removed (or is only hit by legacy edge cases), and drop the form warnings once the data is clean.
Notes
- Related display work: #2280 (affiliated-since grey note).
- Same pattern likely applies to org-level program dates (
OrganizationDecorator#program_since_date) and the orgstart_datefallback — worth checking in the same pass.
- 主要语言
- Ruby
- 星标
- 15
- 派生
- 28
- 平均合并
- 1 天 12 分钟
- 30 天内合并 PR
- 262
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rubyforgood/awbw 的其他 Issue
-
blocked
难度 2/5 1-3 小时 新手友好度 68/100
rubyforgood/awbw#2824 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
rubyforgood/awbw#2822 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
rubyforgood/awbw#2160 ·
维护者通常 1 天内回复
-
Update callout faq defualt text when the new person subscription launches可能已有人在做 @maebeale 于 80 天前认领。 未关闭blocked
难度 2/5 1-3 小时 新手友好度 72/100
rubyforgood/awbw#2095 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
rubyforgood/awbw#2088 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 10 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 2 天内回复
-
area: devops area: integration help wanted lane: free-agent roadmap size: S type: fixture
难度 2/5 1-3 小时 新手友好度 87/100
arminazimi/evergreen#1505 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
waiting-intake
难度 2/5 1-3 小时 新手友好度 65/100