Block CE/scholarship creation directly on a transferred-in registration
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 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
allocatableis 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::BulkPaymentsControllerallocate 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
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rubyforgood/awbw 的其他 Issue
-
blocked
难度 2/5 1-3 小时 新手友好度 68/100
rubyforgood/awbw#2824 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
rubyforgood/awbw#2822 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
rubyforgood/awbw#2160 ·
维护者通常 1 天内回复
-
Update callout faq defualt text when the new person subscription launches可能已有人在做 @maebeale 于 79 天前认领。 未关闭blocked
难度 2/5 1-3 小时 新手友好度 72/100
rubyforgood/awbw#2095 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
rubyforgood/awbw#2088 ·
维护者通常 1 天内回复
相似的 Issue
-
bug P2
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
dracula/homebrew-install#22 ·
-
AppendixG
难度 1/5 1 小时以内 新手友好度 88/100
NatLabRockies/openstudio-standards#2172 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
voxpupuli/puppet-archive#566 ·