diff --git a/.github/workflows/4_2_11.yml b/.github/workflows/4_2_11.yml index 96977e3..2dd6e0d 100644 --- a/.github/workflows/4_2_11.yml +++ b/.github/workflows/4_2_11.yml @@ -47,7 +47,7 @@ jobs: - name: Install package dependencies run: > - sudo apt-get install --yes --quiet + sudo apt-get update && sudo apt-get install --yes --quiet build-essential cmake libicu-dev @@ -88,6 +88,8 @@ jobs: - name: Prepare Redmine source working-directory: redmine run: | + # TODO Remove the following line when https://www.redmine.org/issues/40551 is fixed + sed -i -e 's/.*mocha.*/ gem "mocha", "2.1.0"/' Gemfile # Fix core tests not compatible with Mocha 2.2.0 sed -i '/rubocop/d' Gemfile rm -f .rubocop* cp plugins/redmine_base_rspec/spec/support/database-${{ matrix.db }}.yml config/database.yml diff --git a/.github/workflows/5_1_1.yml b/.github/workflows/5_1_2.yml similarity index 93% rename from .github/workflows/5_1_1.yml rename to .github/workflows/5_1_2.yml index d0a61b1..31a20ba 100644 --- a/.github/workflows/5_1_1.yml +++ b/.github/workflows/5_1_2.yml @@ -1,8 +1,8 @@ -name: Tests 5.1.1 +name: Tests 5.1.2 env: PLUGIN_NAME: redmine_organizations - REDMINE_VERSION: 5.1.1 + REDMINE_VERSION: 5.1.2 on: push: @@ -47,7 +47,7 @@ jobs: - name: Install package dependencies run: > - sudo apt-get install --yes --quiet + sudo apt-get update && sudo apt-get install --yes --quiet build-essential cmake libicu-dev @@ -88,6 +88,8 @@ jobs: - name: Prepare Redmine source working-directory: redmine run: | + # TODO Remove the following line when https://www.redmine.org/issues/40551 is fixed + sed -i -e 's/.*mocha.*/ gem "mocha", "2.1.0"/' Gemfile # Fix core tests not compatible with Mocha 2.2.0 rm -f test/integration/routing/plugins_test.rb # Fix routing tests # TODO Remove this line when https://www.redmine.org/issues/38707 is fixed sed -i '/rubocop/d' Gemfile rm -f .rubocop* diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ded4ec5..6a30274 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -47,7 +47,7 @@ jobs: - name: Install package dependencies run: > - sudo apt-get install --yes --quiet + sudo apt-get update && sudo apt-get install --yes --quiet build-essential cmake libicu-dev diff --git a/README.md b/README.md index 8c7e4e7..3f96e23 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ Tests status |Plugin branch| Redmine Version | Test Status | |-------------|-----------------|-------------------| |master | 4.2.11 | [![4.2.11][1]][5] | -|master | 5.1.1 | [![5.1.1][2]][5] | +|master | 5.1.2 | [![5.1.2][2]][5] | |master | master | [![master][4]][5] | [1]: https://github.com/jbbarth/redmine_organizations/actions/workflows/4_2_11.yml/badge.svg -[2]: https://github.com/jbbarth/redmine_organizations/actions/workflows/5_1_1.yml/badge.svg +[2]: https://github.com/jbbarth/redmine_organizations/actions/workflows/5_1_2.yml/badge.svg [4]: https://github.com/jbbarth/redmine_organizations/actions/workflows/master.yml/badge.svg [5]: https://github.com/jbbarth/redmine_organizations/actions diff --git a/app/controllers/organizations/memberships_controller.rb b/app/controllers/organizations/memberships_controller.rb index 550ca32..21d6d82 100644 --- a/app/controllers/organizations/memberships_controller.rb +++ b/app/controllers/organizations/memberships_controller.rb @@ -7,7 +7,7 @@ class Organizations::MembershipsController < ApplicationController before_action :find_project_by_project_id, :is_allowed_to_manage_members? before_action :find_organization, except: [:new, :create_non_members_roles, :update_group_non_member_roles] before_action :members_to_delete_from_organization_in_project, only: [:destroy_organization] - after_action :journalized_detroying_organization, only: [:destroy_organization] if Redmine::Plugin.installed?(:redmine_admin_activity) + after_action :journalized_destroying_organization, only: [:destroy_organization] if Redmine::Plugin.installed?(:redmine_admin_activity) def new @member = Member.new @@ -216,7 +216,7 @@ def members_to_delete_from_organization_in_project @members_to_delete = @organization.members_by_organization_in_project(@project).select { |member| member if member.deletable? } end - def journalized_detroying_organization + def journalized_destroying_organization @members_to_delete.each do |member| previous_role_ids = member.role_ids previous_function_ids = member.function_ids if limited_visibility_plugin_installed?