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

Block CE/scholarship creation directly on a transferred-in registration

Đang mở
#2,162 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
ruby
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu với app/models/event_registration.rb và phương thức transferred_in?, sau đó lần theo ScholarshipsController#new/create, ContinuingEducationRegistrationsController#new/create và luồng phân bổ của Events::BulkPaymentsController. So sánh các điểm vào này với những nhánh biểu mẫu chỉnh sửa hiện có trong _form.html.erb và _transferred_in_financials.html.erb. Được xem là hoàn tất khi mọi lần thử tạo hoặc phân bổ nhắm đến một đăng ký được chuyển vào đều bị chặn hoặc chuyển hướng kèm một thông báo rõ ràng trỏ đến đăng ký nguồn.

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

Mô tả

Follow-up from #1944 / PR #2044.

A transferred-in registration's scholarship/CE/payments are meant to live on its source registration. The edit form hides the "Add scholarship" / "Add CE registration" cards for a transferred-in reg, but nothing stops an admin from reaching those new forms by URL and creating a scholarship or CE record against the transferred-in reg directly.

If that happens, the record sits on the wrong registration. Dashboard/revenue already exclude transferred-in regs from financial totals (billable basis), so it wouldn't inflate the new event's money — but it's still misfiled and would show nowhere useful.

Suggested fix
  • Guard scholarship/CE creation (and allocation) when the target allocatable is a transferred-in EventRegistration — reject with a clear message pointing to the source reg, or redirect there.
  • Consider the same guard for the bulk-payment allocation path (already excluded from the list, but the POST could still target one by id).
Context
  • app/models/event_registration.rb — transferred_in?.
  • ScholarshipsController#new/create, ContinuingEducationRegistrationsController#new/create, Events::BulkPaymentsController allocate path.
  • Edit form already branches on transferred_in? to hide the cards (_form.html.erb / _transferred_in_financials.html.erb).
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.