Closed aknarts closed 14 years ago
don't hard code sql! you should use conditions like so: :conditions => ["issue_statuses.is_closed = ? AND user_story_id IS NULL AND (fixed_version_id = ? OR project_id = ?)",false, @sprint.id, @project.id ]
since postgres and mysql handle Boolean values different
Hello, today I installed this plugin on Redmine 0.9.3 and it works great(part from interfering with http://www.redmine.org/wiki/redmine/PluginCollapse with the page layout)
But when going to Dashboard I get internal server error and in server log this:
ActiveRecord::StatementInvalid (PGError: ERROR: operator does not exist: boolean = integer LINE 1: ...ssues".status_id WHERE (issue_statuses.is_closed = 0 AND us... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. : SELECT "issues".* FROM "issues" INNER JOIN "issue_statuses" ON "issue_statuses".id = "issues".status_id WHERE (issue_statuses.is_closed = 0 AND user_story_id IS NULL AND (fixed_version_id = 12 OR project_id = 3)) ): vendor/plugins/redmine_sprints/app/controllers/sprints_controller.rb:30:in
show' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in
service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:inrun' /usr/lib/ruby/1.8/webrick/server.rb:173:in
start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:instart' /usr/lib/ruby/1.8/webrick/server.rb:162:in
start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart' /usr/lib/ruby/1.8/webrick/server.rb:92:in
each' /usr/lib/ruby/1.8/webrick/server.rb:92:instart' /usr/lib/ruby/1.8/webrick/server.rb:23:in
start' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'I fixed the issue in vendor/plugins/redmine_sprints/app/controllers/sprints_controller.rb by changing "issues".status_id WHERE (issue_statuses.is_closed = 0 ... to "issues".status_id WHERE (issue_statuses.is_closed IS FALSE
this helped and it works fine for now. Dont know if there is any more changes needed to be made but we will se about that in some time(after some usage).