Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Backfill facilitator affiliation start dates from legacy member_since

未关闭
#2,284 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
活跃
技术栈
ruby
领域
backend, database

调研方向

先从 app/decorators/person_decorator.rb 和 facilitator_since_date fallback 开始,然后检查 issue 中提到的 affiliation 开始日期检查。在实现带有 dry-run 报告的幂等 migration 或 rake task 之前,定义冲突处理方式并检查相关的 organization fallback。完成的标准是:补齐缺失的日期且不覆盖已有日期,报告可供审查,并重新评估 fallback 和警告。

由索引模型根据 Issue 内容生成。

描述

database cleanup facilitator-profile

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 Facilitator affiliation(s) have a blank start_date, populate it from member_since (the earliest sensible value).
  • Conflicts: decide what to do when member_since is 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_since fallback in facilitator_since_date can 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 org start_date fallback — worth checking in the same pass.
主要语言
Ruby
星标
15
派生
28
平均合并
1 天 12 分钟
30 天内合并 PR
262

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rubyforgood/awbw 的其他 Issue

查看 rubyforgood/awbw 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。