Backfill facilitator affiliation start dates from legacy member_since
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
まず app/decorators/person_decorator.rb と facilitator_since_date のフォールバックを確認し、その後、issue で示されている affiliation の開始日のチェックを確認します。競合の処理方法を定義し、関連する organization のフォールバックを調査してから、dry-run レポート付きのべき等なマイグレーションまたは rake task を実装します。既存の日付を上書きせずに不足している日付が補完され、レポートをレビューでき、フォールバックと警告が再評価されていれば完了です。
索引モデルが 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分
- マージ済み PR(30日)
- 262
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 が 79 日前に担当しました。 オープンblocked
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rubyforgood/awbw#2095 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
rubyforgood/awbw#2088 ·
メンテナーはふだん 1 日以内に返信
rubyforgood/awbw の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
hackclub/hcb#15454 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
voxpupuli/puppet-archive#566 ·
-
area/tech debt
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 2 日以内に返信
-
verified
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 5 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
akitaonrails/ai-book-2026#10 ·