Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Resources ↔ Organization: follow-ups after PR #2421

Aberta
#2,425 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
45/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
ruby
Domínio
backend, database

Direção de pesquisa

Comece lendo PR #2421 e .context/resolve_resource_organizations.rb, execute o dry-run conforme documentado e revise como os formulários de recursos e os registros de Organization são tratados. Esclareça a decisão sobre filemaker_code, adicione o seletor de Organization para administradores e confirme as contagens de resolve em produção antes de preparar a migração reversível que remove agency.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

database cleanup enhancement

🤖 From Claude: filed on behalf of @maebeale to track the open items from PR #2421.

PR #2421 gave resources a real Organization link (resources.organization_id FK + belongs_to :organization), replacing the legacy free-text resources.agency name, and added a one-time resolve script (.context/resolve_resource_organizations.rb) that matches/creates an org by exact name. Three follow-ups were deliberately left out of that PR:

1. Enrich created orgs with the resource's filemaker_code

When the resolve pass creates a new Organization (no name match), it currently sets name + Active status only. Resources also carry a filemaker_code, and FileMaker code is the org source-of-truth (matched by set-intersection elsewhere). Decide whether a newly-created org should inherit resource.filemaker_code so it's dedup-able later.

  • Trade-off: richer data + better future matching vs. importing a code we didn't match on.
2. Org picker on the resource form

resources.agency was never form-editable, and no org picker was added — so new resources still won't set an organization until we add that UI. Add an Organization select to the resource form (admin) if we want new resources linked at creation time.

3. Drop the resources.agency column (after the resolve pass runs)

The agency column is kept for now so the resolve script can read it. Once the resolve pass has run in prod, drop the column in a follow-up reversible migration.

  • Sequencing: run the resolve pass in prod → confirm counts → then drop agency.

Context: PR #2421 · resolve script lives at .context/resolve_resource_organizations.rb (gitignored — dry-run first, idempotent).

Linguagem predominante
Ruby
Estrelas
15
Forks
28
Merge médio
1d 12min
PRs com merge (30d)
262

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de rubyforgood/awbw

Todas as issues de rubyforgood/awbw

Issues semelhantes

Mais issues de Ruby

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.