diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dde448..defe916 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Hitobito Jubla Changelog +## unreleased + +* Filter nach für ausgetretene Personen von "Ehemalige" zu "Austritte" umbenannt (hitobito_jubla#159) + ## Version 2.2 * Unnötige Rechte der Fachgruppenmitglieder entfernt (hitobito_jubla#89) diff --git a/app/models/jubla/group.rb b/app/models/jubla/group.rb index 753f358..eb4f619 100644 --- a/app/models/jubla/group.rb +++ b/app/models/jubla/group.rb @@ -72,7 +72,7 @@ def children_without_deleted_and_alumni_groups end def create_alumni_filter - people_filters.create!(name: "Ehemalige", + people_filters.create!(name: "Austritte", group_id: id, range: :group, filter_chain: alumni_filter_chain) diff --git a/db/migrate/20241212151700_rename_alumni_filter.rb b/db/migrate/20241212151700_rename_alumni_filter.rb new file mode 100644 index 0000000..96314df --- /dev/null +++ b/db/migrate/20241212151700_rename_alumni_filter.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class RenameAlumniFilter < ActiveRecord::Migration[7.0] + def up + execute "UPDATE people_filters SET name = 'Austritte' WHERE name = 'Ehemalige';" + end + + def down + execute "UPDATE people_filters SET name = 'Ehemalige' WHERE name = 'Austritte';" + end +end diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index 5fa62df..fd7c562 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -140,7 +140,7 @@ it "creating non alumnus group creats alumnus filter" do expect do board = Group::FederalBoard.create(name: "board", parent_id: group.id) - filter = board.people_filters.find_by(name: "Ehemalige") + filter = board.people_filters.find_by(name: "Austritte") expect(filter.filter_chain).to be_present end.to change { PeopleFilter.count }.by(1) end