-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance plugin compatibility with Redmine 5.1.2
- Loading branch information
Showing
51 changed files
with
1,223 additions
and
1,083 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
lib/redmine_admin_activity/controllers/custom_field_enumerations_controller.rb
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
lib/redmine_admin_activity/controllers/custom_field_enumerations_controller_patch.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
require_dependency 'custom_field_enumerations_controller' | ||
|
||
module RedmineAdminActivity::Controllers | ||
module CustomFieldEnumerationsControllerPatch | ||
extend ActiveSupport::Concern | ||
|
||
def get_previous_custom_field_enumerations | ||
@previous_custom_field_enumerations_ids = @custom_field.enumerations.select { |i| i.active }.map(&:id) | ||
end | ||
|
||
def create_custom_field_history | ||
|
||
changes = get_custom_field_enumerations_changes(@custom_field, @previous_custom_field_enumerations_ids) | ||
|
||
JournalSetting.create( | ||
:user_id => User.current.id, | ||
:value_changes => changes.except!(:custom_values), | ||
:journalized_type => @custom_field.class.name, | ||
:journalized_id => @custom_field.id, | ||
:journalized_entry_type => "update", | ||
) | ||
|
||
end | ||
end | ||
end | ||
|
||
class CustomFieldEnumerationsController | ||
include RedmineAdminActivity::Journalizable | ||
include RedmineAdminActivity::Controllers::CustomFieldEnumerationsControllerPatch | ||
|
||
append_before_action :get_previous_custom_field_enumerations, :only => [:create, :destroy, :update_each] | ||
after_action :create_custom_field_history, :only => [:create, :destroy, :update_each] | ||
|
||
end |
131 changes: 0 additions & 131 deletions
131
lib/redmine_admin_activity/controllers/custom_fields_controller.rb
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.