Closed fundenys closed 12 years ago
The redmine uses the :identifier find a project. By default the params use thought the url REST action (get or post) is the :id like http://www.yourredmine.com/projects/:id. On controller to get the project u have to use the :id as params from URL to use as :identifier as follow the code: // url .../projects/100001/ @project = Project.find_by_identifier(params[:id])
After that the controllers works with the @project.id to find the subprojects. stringSqlProjectsSubProjects = tool.return_ids(@project.id) @projects_subprojects = Project.find_by_sql("select * from projects where id in (#{stringSqlProjectsSubProjects});")
Actually Im developing using Textmate edit and Firebug (Firefox inspect and debug the javascripts) only.
Hope helped you.
Thanks for reporting.
ok, i just replaced project = Project.find_by_identifier(project_identifier) by project = Project.find_by_id(project_identifier) and its ok to find stringSqlProjectsSubProjects. i can now use where project_id in (#{stringSqlProjectsSubProjects}) I will now look at what happens at the click. thank you very much for your quick response
hi, i work on redmine 2.0.3 and ruby 1.8.7 When i install this plugin, i had a problem with mc_tools. i made some change because the project have a id=2 and identifier = 100001 in debug with netbean, the var project_identifier=2 but project.find_by_identifier(2) return null So i commented project= and stringsqlprojectsubprojects and i remplaced #{stringsqlprojectsubprojects} by #{project_identifier} and its ok def countTasks(project_identifier, isClosed)
get main project
end its the same when i click on bar graphic. he open a new window with project/1000001/issue? and not redmine/project/2/issue? identifier is not the same as id Can you confirm this and say me how you debug your plugin(i have some probleme with javascript in debug)