Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Resources ↔ Organization: follow-ups after PR #2421

Đang mở
#2,425 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ruby
Lĩnh vực
backend, database

Hướng nghiên cứu

Bắt đầu bằng cách đọc PR #2421 và .context/resolve_resource_organizations.rb, chạy dry-run như đã được hướng dẫn và xem xét cách các biểu mẫu resource và các bản ghi Organization được xử lý. Làm rõ quyết định về filemaker_code, thêm bộ chọn Organization cho admin và xác nhận số lượng resolve trong production trước khi chuẩn bị migration có thể hoàn tác để loại bỏ agency.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
Ruby
Star
15
Fork
28
Merge trung bình
1 ngày 12 phút
Pull request đã merge (30 ngày)
262

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rubyforgood/awbw

Tất cả issue của rubyforgood/awbw

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.