diff --git a/app/views/admin/legislation/proposals/_form.html.erb b/app/views/admin/legislation/proposals/_form.html.erb
index 3e6ab0f8f..5d1a14370 100644
--- a/app/views/admin/legislation/proposals/_form.html.erb
+++ b/app/views/admin/legislation/proposals/_form.html.erb
@@ -3,7 +3,7 @@
<%= render "shared/errors", resource: @process %>
- <%= f.text_field :custom_list, value: @process.tag_list_on(:customs).to_s,
+ <%= f.text_field :custom_list, value: @process.tag_list_on(:customs).sort.join(", "),
label: t("admin.legislation.proposals.form.custom_categories"),
hint: t("admin.legislation.proposals.form.custom_categories_description"),
placeholder: t("admin.legislation.proposals.form.custom_categories_placeholder"),
diff --git a/spec/features/admin/legislation/processes_spec.rb b/spec/features/admin/legislation/processes_spec.rb
index b509fc95a..822240489 100644
--- a/spec/features/admin/legislation/processes_spec.rb
+++ b/spec/features/admin/legislation/processes_spec.rb
@@ -244,18 +244,20 @@ describe "Admin collaborative legislation" do
visit edit_admin_legislation_process_path(process)
within(".admin-content") { click_link "Proposals" }
- fill_in "Categories", with: "recycling,bicycles"
+ fill_in "Categories", with: "recycling,bicycles,pollution"
click_button "Save changes"
visit admin_legislation_process_proposals_path(process)
- expect(page).to have_field("Categories", with: "bicycles, recycling")
+
+ expect(page).to have_field("Categories", with: "bicycles, pollution, recycling")
within(".admin-content") { click_link "Information" }
fill_in "Summary", with: "Summarizing the process"
click_button "Save changes"
visit admin_legislation_process_proposals_path(process)
- expect(page).to have_field("Categories", with: "bicycles, recycling")
+
+ expect(page).to have_field("Categories", with: "bicycles, pollution, recycling")
end
scenario "Edit milestones summary", :js do