Skip to content

Commit

Permalink
Rename Alumnusfilter to reflect the new intended use
Browse files Browse the repository at this point in the history
  • Loading branch information
kronn committed Dec 12, 2024
1 parent d49cbb9 commit 1461c9e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/models/jubla/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions db/migrate/20241212151700_rename_alumni_filter.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion spec/models/group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1461c9e

Please sign in to comment.