Project

General

Profile

Actions

Defect #7656

closed

MySQL SQL Syntax Error when filtering issues by Assignee's Group

Added by Anonymous almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
Start date:
2011-02-18
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Redmine version: 1.1.1
MySQL 5.0.32-Debian_7etch6

how to reproduce:

  • create assignee's group in Administration -> Groups with no members
  • go to Issues in any project
  • add filter "Assignee's Group" with this blank group
  • press Filter and boom, blank screen appears and this is in production log:
Processing IssuesController#index (for 89.176.79.118 at 2011-02-18 17:55:36) [POST]
  Parameters: {"group_by"=>"", "set_filter"=>"1", "project_id"=>"truhlari", "action"=>"index", "authenticity_token"=>"oxyA9vxYzC6I8uCpmMC+L4fndyUYjOH9Pl6LOQxb1P4=", "fields"=>["status_id", "member_of_group", ""], "operators"=>{"start_date"=>"<t+", "assigned_to_role"=>"=", "watcher_id"=>"=", "estimated_hours"=>"=", "created_on"=>">t-", "priority_id"=>"=", "fixed_version_id"=>"=", "done_ratio"=>"=", "updated_on"=>">t-", "subject"=>"~", "assigned_to_id"=>"=", "tracker_id"=>"=", "due_date"=>"<t+", "author_id"=>"=", "status_id"=>"o", "member_of_group"=>"="}, "values"=>{"start_date"=>[""], "assigned_to_role"=>["3"], "watcher_id"=>["me"], "estimated_hours"=>[""], "created_on"=>[""], "priority_id"=>["3"], "fixed_version_id"=>["49"], "done_ratio"=>[""], "updated_on"=>[""], "subject"=>[""], "assigned_to_id"=>["me"], "tracker_id"=>["2"], "due_date"=>[""], "author_id"=>["me"], "status_id"=>["1"], "member_of_group"=>["39"]}, "controller"=>"issues", "_"=>"", "query"=>{"column_names"=>["tracker", "status", "subject", "assigned_to", "updated_on", "fixed_version", "estimated_hours", "done_ratio"]}}
Query::StatementInvalid: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AND projects.id = 42 AND projects.status=1 AND projects.id IN (SELECT em.proj' at line 1: SELECT count(DISTINCT `issues`.id) AS count_all FROM `issues`  LEFT OUTER JOIN `issue_statuses` ON `issue_statuses`.id = `issues`.status_id  LEFT OUTER JOIN `projects` ON `projects`.id = `issues`.project_id WHERE ((issue_statuses.is_closed=0) AND (issues.assigned_to_id IN ()) AND projects.id = 42 AND projects.status=1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) 

When I filter issues by assignee's group with any member, it works nicely :)

Actions

Also available in: Atom PDF