Project

General

Profile

Actions

Patch #14606

closed

Internal error when copying an issue + on "my page" in block "assigned to me"

Added by Mattanja Kern almost 11 years ago. Updated over 10 years ago.

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

0%

Estimated time:

Description

I stumbled upon an issue in the latest svn version of Redmine and have attached a small path for the problem. You might want to look for the root cause of the issue since obviously my fix is probably only a workaround:

-          user_ids = [user.id] + user.groups.map(&:id)
+ user_ids = [user.id] + user.groups.map(&:id).reject(&:nil?
$ svn info
Path: .
URL: http://svn.redmine.org/redmine/trunk
Repository Root: http://svn.redmine.org/redmine
Repository UUID: e93f8b46-1217-0410-a6f0-8f06a7374b81
Revision: 12072
Node Kind: directory
Schedule: normal
Last Changed Author: tmaruyama
Last Changed Rev: 12072
Last Changed Date: 2013-08-01 05:31:54 +0200 (Thu, 01 Aug 2013)
Environment:
Redmine version 2.3.2.devel.12072
Ruby version 2.0.0-p247 (2013-06-27) [x86_64-linux]
Rails version 3.2.13
Environment production
Database adapter Mysql2
SCM:
Subversion 1.6.17
Git 1.7.9.5
Filesystem
Redmine plugins:
clipboard_image_paste 1.7
redmine_lightbox 0.0.1

Completed 500 Internal Server Error in 35ms

ActionView::Template::Error (Mysql2::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 ')))) OR (projects.id IN (23,1,24,22) AND ((issues.is_private = 0 OR issues.autho' at line 1: SELECT COUNT FROM `issues` LEFT OUTER JOIN `projects` ON `projects`.`id` = `issues`.`project_id` LEFT OUTER JOIN `issue_statuses` ON `issue_statuses`.`id` = `issues`.`status_id` WHERE (((projects.status <> 9 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND ((projects.is_public = 1 AND ((issues.is_private = 0 OR issues.author_id = 87 OR issues.assigned_to_id IN (87,85,)))) OR (projects.id IN (23,1,24,22) AND ((issues.is_private = 0 OR issues.author_id = 87 OR issues.assigned_to_id IN (87,85,)))) OR (projects.id IN (20) AND ((issues.is_private = 0 OR issues.author_id = 87 OR issues.assigned_to_id IN (87,85,)))) OR (projects.id IN (21) AND ((issues.is_private = 0 OR issues.author_id = 87 OR issues.assigned_to_id IN (87,85,))))))) AND (issue_statuses.is_closed = 0) AND ((`issues`.`assigned_to_id` IN (87, 85) OR `issues`.`assigned_to_id` IS NULL))):
1: <h3>
2: <%= link_to l(:label_assigned_to_me_issues),
3: issues_path(:set_filter => 1, :assigned_to_id => 'me', :sort => 'priority:desc,updated_on:desc') >
4: (<
= Issue.visible.open.where(:assigned_to_id => ([User.current.id] + User.current.group_ids)).count >)
5: </h3>
6:
7: <
assigned_issues = issuesassignedtome_items %>
app/views/my/blocks/_issuesassignedtome.html.erb:4:in `_app_views_my_blocks__issuesassignedtome_html_erb___3305484256914345155_39797900'
app/views/my/page.html.erb:11:in `block in app_views_my_page_html_erb_2950117810366781438_39717000'
app/views/my/page.html.erb:8:in `each'
app/views/my/page.html.erb:8:in `_app_views_my_page_html_erb__2950117810366781438_39717000'


Files

patch_empty_group_id.diff (840 Bytes) patch_empty_group_id.diff patch or workaround for the issue Mattanja Kern, 2013-08-02 23:18

Related issues

Related to Redmine - Defect #14939: Wiki link to specific issues failedClosed

Actions
Actions

Also available in: Atom PDF