Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/views/organizations/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,12 @@
<% end %>

<% if params[:admin] && allowed_to?(:manage?, Organization) %>
<div class="<%= 'admin-only bg-blue-100' if allowed_to?(:manage?, Organization) %> mb-6">
<div class="admin-only mb-6 bg-blue-100">
<%= 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"
} %>
</div>
Expand Down
12 changes: 12 additions & 0 deletions app/views/people/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,18 @@
<%= render "shared/comments_and_communications", f: f, view_all_person: @person %>
<% end %>

<% if params[:admin] && allowed_to?(:manage?, Person) %>
<div class="admin-only mb-6 bg-blue-100">
<%= 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"
} %>
</div>
<% end %>

<div class="action-buttons mt-8 flex justify-center gap-3">
<% if allowed_to?(:destroy?, f.object) %>
<%= link_to "Delete", @person, class: button_classes(:danger_outline),
Expand Down
11 changes: 11 additions & 0 deletions config/features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
13 changes: 13 additions & 0 deletions spec/views/organizations/edit.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }

Expand Down
17 changes: 17 additions & 0 deletions spec/views/people/edit.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading