Good evening everyone! I am stuck with something about a plugin of mine, and I would really appreciate some advice.
The problem
I wrote a simple plugin, that modifies the form for creating a new project by adding new fieldset with some checkboxes. I wrote all of the login in my files in my plugin directory. So far, so good. Everything works fine, except that when it came to sending the files to my colleagues, there was something they didn't like. It appears that they are not too fond of the idea of modifying the core files a bit in order to get things working, because things may go messed up when they update the version of Redmine. I've managed to reduce the code injected in the core files to 3 lines only (3 lines, ikr!!), but that's as far as I could go.
projects_controller.rb
selected_tasks = params[:checkListItems].collect {|id| id.to_i}
call_hook(:add_tasks_after_project_save, { :selected_ids => selected_tasks, :project => @project})
And in project's form /views/projects/_form.html.erb
<%= call_hook(:append_check_list_tasks, { :project => @project }) %>
I wont be surprised if there is a way to remove the code I use in projects_controller.rb and use only the one in my files, but I'm not so sure about the hook I placed inside the form.html.
The question in short
IS there a way to get my plugin working the way it is like now, but without having to modify the core files of Redmine?