Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Backfill facilitator affiliation start dates from legacy member_since

オープン
#2,284 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
活発
技術スタック
ruby
領域
backend, database

調査の方向性

まず app/decorators/person_decorator.rb と facilitator_since_date のフォールバックを確認し、その後、issue で示されている affiliation の開始日のチェックを確認します。競合の処理方法を定義し、関連する organization のフォールバックを調査してから、dry-run レポート付きのべき等なマイグレーションまたは rake task を実装します。既存の日付を上書きせずに不足している日付が補完され、レポートをレビューでき、フォールバックと警告が再評価されていれば完了です。

索引モデルが 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分
マージ済み PR(30日)
262

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rubyforgood/awbw のほかの issue

rubyforgood/awbw の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。