Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#2,162 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
ruby
领域
backend

调研方向

从 app/models/event_registration.rb 及其 transferred_in? 方法开始,然后跟踪 ScholarshipsController#new/create、ContinuingEducationRegistrationsController#new/create 以及 Events::BulkPaymentsController 的分配路径。将这些入口点与 _form.html.erb 和 _transferred_in_financials.html.erb 中现有的编辑表单分支进行比较。完成的标准是:每个针对转入登记的创建或分配尝试都会被阻止或重定向,并显示一条明确指向源登记的消息。

由索引模型根据 Issue 内容生成。

描述

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).
主要语言
Ruby
星标
15
派生
28
平均合并
1 天 12 分钟
30 天内合并 PR
262

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rubyforgood/awbw 的其他 Issue

查看 rubyforgood/awbw 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。