I've found a bug on my_calendar plugin.
If an user is not involved on any project (e.g. admin), if you click on my_calendar link you get an internal error.
Mysql::Error: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')))'
at line 1: SELECT `versions`.`id` AS t0_r0, `versions`.`project_id` AS t0_r1, `versions`.`name` AS t0_r2,
`versions`.`description` AS t0_r3, `versions`.`effective_date` AS t0_r4, `versions`.`created_on` AS t0_r5,
`versions`.`updated_on` AS t0_r6, `versions`.`wiki_page_title` AS t0_r7, `projects`.`id` AS t1_r0, `projects`.`name` AS t1_r1, `projects`.`description` AS t1_r2, `projects`.`homepage` AS t1_r3,
`projects`.`is_public` AS t1_r4, `projects`.`parent_id` AS t1_r5, `projects`.`projects_count` AS t1_r6, `projects`.`created_on` AS t1_r7, `projects`.`updated_on` AS t1_r8, `projects`.`identifier` AS t1_r9,
`projects`.`status` AS t1_r10 FROM `versions` LEFT OUTER JOIN `projects` ON `projects`.id =
`versions`.project_id WHERE ((effective_date BETWEEN '2008-07-27' AND '2008-09-06') and (project_id IN ()))
That's because project_id IN ()
is not a valid SQL statement.
I suppose that Problem is on vendor/plugins/my_calendar/app/controllers/calendar_controller.rb, where retrieve_selected_tracker_ids, for not involved users, does not find anything.
Should be nice that:
- If the user is not involved on any project will be diplayed an empty calendar (or link is not displayed);
- (optional) If the user is admin, all Issues an Versions will be displayed.
By the way it's a useful plugin and i hope it become an official plugin asap.
Regards,
A.Maleci