From 611de44f860c38515e0f7e8579fd11997199482d Mon Sep 17 00:00:00 2001 From: Mae Beale Date: Wed, 14 Oct 2026 16:46:30 -0400 Subject: [PATCH 1/3] Let admins see and edit a person's internal notes behind ?admin People notes held legacy FileMaker comments that only surfaced on the dedupe page; orgs and users already expose theirs behind ?admin. Co-Authored-By: Claude Opus 5.5 (1M context) --- app/views/people/_form.html.erb | 12 ++++++++++++ spec/views/people/edit.html.erb_spec.rb | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/app/views/people/_form.html.erb b/app/views/people/_form.html.erb index 93913a2383..5b82b571e7 100644 --- a/app/views/people/_form.html.erb +++ b/app/views/people/_form.html.erb @@ -580,6 +580,18 @@ <%= render "shared/comments_and_communications", f: f, view_all_person: @person %> <% end %> + <% if params[:admin] && allowed_to?(:manage?, Person) %> +
+ <%= f.input :notes, + as: :text, + label: "Internal notes", + input_html: { + rows: 3, + class: "rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-200" + } %> +
+ <% end %> +
<% if allowed_to?(:destroy?, f.object) %> <%= link_to "Delete", @person, class: button_classes(:danger_outline), diff --git a/spec/views/people/edit.html.erb_spec.rb b/spec/views/people/edit.html.erb_spec.rb index 4190ae1676..46056339cd 100644 --- a/spec/views/people/edit.html.erb_spec.rb +++ b/spec/views/people/edit.html.erb_spec.rb @@ -79,4 +79,21 @@ expect(rendered).to have_select('Primary email type') end end + + it "hides the internal notes field without the admin param" do + expect(rendered).not_to have_field("Internal notes") + end + + context "when params[:admin] is present" do + let(:person) { create(:person, notes: "Met at the spring training") } + + before do + allow(view).to receive(:params).and_return(ActionController::Parameters.new(admin: "true")) + render + end + + it "shows the internal notes field" do + expect(rendered).to have_field("Internal notes", with: "Met at the spring training") + end + end end From 25885315bd197841f7c296d7a5482b1938d786a5 Mon Sep 17 00:00:00 2001 From: Mae Beale Date: Wed, 14 Oct 2026 16:47:03 -0400 Subject: [PATCH 2/3] List admin person notes on the features page Co-Authored-By: Claude Opus 5.5 (1M context) --- config/features.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/features.yml b/config/features.yml index af14287236..095ff0ac2c 100644 --- a/config/features.yml +++ b/config/features.yml @@ -4526,3 +4526,14 @@ - "Changes that get called out: a new scholarship, CE credit, W-9, or invoice request, a different payment method, a change in whether someone else is paying, a newly linked organization, and any answer (name, address, sectors, and so on) that differs from their previous submission." - "If the resubmission adds a scholarship request, the subject ends with \"(scholarship now requested)\"." - "Filter the Communications page by \"Admin FYI: duplicate event registration\" or \"Duplicate event registration received\" to find these emails." + +- name: "Internal notes on people" + area: people + display_status: admin_facing + released_on: 2026-10-14 + pr_number: 2689 + summary: >- + Admins can see and edit a person's internal notes, which hold comments + carried over from FileMaker, on the person's edit page. + pro_tips: + - "Add ?admin=true to the end of the edit page's address to show the Internal notes box, the same as on organizations and users." From 98d3d5a7052e9777049b4325a8ed2fcf8a0ff385 Mon Sep 17 00:00:00 2001 From: Mae Beale Date: Wed, 14 Oct 2026 18:41:15 -0400 Subject: [PATCH 3/3] Cover org internal notes behind ?admin and match the person field Sentence-case the label; the disabled toggle was dead since the block already requires manage?. Co-Authored-By: Claude Opus 5.5 (1M context) --- app/views/organizations/_form.html.erb | 5 ++--- spec/views/organizations/edit.html.erb_spec.rb | 13 +++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/views/organizations/_form.html.erb b/app/views/organizations/_form.html.erb index edc5f91269..7302eee21c 100644 --- a/app/views/organizations/_form.html.erb +++ b/app/views/organizations/_form.html.erb @@ -420,13 +420,12 @@ <% end %> <% if params[:admin] && allowed_to?(:manage?, Organization) %> -
+
<%= f.input :notes, as: :text, - label: "Internal Notes", + label: "Internal notes", input_html: { rows: 3, - disabled: !allowed_to?(:manage?, Organization), class: "rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-200" } %>
diff --git a/spec/views/organizations/edit.html.erb_spec.rb b/spec/views/organizations/edit.html.erb_spec.rb index 2a81bc03a7..37fe0aff68 100644 --- a/spec/views/organizations/edit.html.erb_spec.rb +++ b/spec/views/organizations/edit.html.erb_spec.rb @@ -114,6 +114,19 @@ def org_with_status(name) end end + describe "internal notes" do + it "hides the internal notes field without the admin param" do + render + expect(rendered).not_to have_field("Internal notes") + end + + it "shows the internal notes field with the admin param" do + allow(view).to receive(:params).and_return(ActionController::Parameters.new(admin: "true")) + render + expect(rendered).to have_field("Internal notes", with: "MyText") + end + end + describe "facilitators since" do before(:each) { assign(:organization_statuses, OrganizationStatus.all) }