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
Problem
Facilitator start dates now come from affiliation records, but the profile/decorator still falls back to the legacy
member_sincecolumn when aFacilitatoraffiliation has nostart_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_sincerather 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_sinceis no longer needed as a fallback for facilitators.Scope / questions to settle
Facilitatoraffiliation(s) have a blankstart_date, populate it frommember_since(the earliest sensible value).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.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
OrganizationDecorator#program_since_date) and the orgstart_datefallback — worth checking in the same pass.