redmine_customize icon indicating copy to clipboard operation
redmine_customize copied to clipboard

require in patches breaks other plugins

Open swiehr opened this issue 8 years ago • 0 comments

The require_dependency in the patches provided by this plugin break other plugins functionality.

Found as a conflict with Redmine detailed issues and detailed timelog where methods patched into IssuesHelper would not be found due to require_dependency 'issues_controller' in patch for IssuesController of Redmine Customization plugin.

The effect of the require present and being dropped respectively can easily bee seen when comparing self.class.included and self.class.instance_methods in an issue view (e.g. in _history.html.erb of the mentioned plugin) -> with the require patches done by the other plugin are not included in the view.

From my understanding require shouldn't be necessary anyway with Rails auto loading doing its job.

I personally favor the patching scheme as used by Jens Krämer for his Redmine Issue Done Ratio Plugin which needs no require except for the init.rb - but that's probably just a matter of personal taste.

Another minor issue: redmine_customize/patches/issues_helper_patch is included by require_dependency but not added with a corresponding IssueHelper.send :include

swiehr avatar Mar 13 '17 13:03 swiehr