Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with redmine_checklists #33

Closed
MayamaTakeshi opened this issue Apr 28, 2023 · 1 comment
Closed

Incompatible with redmine_checklists #33

MayamaTakeshi opened this issue Apr 28, 2023 · 1 comment

Comments

@MayamaTakeshi
Copy link
Owner

MayamaTakeshi commented Apr 28, 2023

When I have this plugin installed
and click 'Submit' on the Edit window, this happens:

NoMethodError in IssuesController#update
undefined method `checklists' for nil:NilClass
Extracted source (around line #53):


51
52        def save_before_state
53          @issue.old_checklists = @issue.checklists.to_json
54          checklists_params = params[:issue].present? && params[:issue][:checklists_attributes].present? ? params[:issue][:checklists_attributes] : {}
55          @issue.removed_checklist_ids =
56            if checklists_params.present?

We can see this plugin have this patch:

$ find . -type f|xargs grep save_before_state
./redmine_checklists/lib/redmine_checklists/patches/issues_controller_patch.rb:          before_action :save_before_state, :only => [:update]
./redmine_checklists/lib/redmine_checklists/patches/issues_controller_patch.rb:        def save_before_state
$ 

It does some patching in issues_controller that seem to be incompatible with redmine_rt.

@MayamaTakeshi
Copy link
Owner Author

It seems there are issues when more than one plugin patches the same controller (in this case, IssuesController).
In particular, calling the before_action methods.
I removed those from my patch and it seems OK now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant