Defect #150

sorting error at the header of the list 'Assigned to'

Added by zeous park over 11 years ago. Updated over 11 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:



I found sorting error that 'Assigned to' header.
When I clicked 'Assigned to' header, the list did not sort by assigned_to_id.lastname.
It sorted by author_id.lastname.

I traced query =================================================================
SELECT issues.`id` AS t0_r0, issues.`tracker_id` AS t0_r1, issues.`project_id` AS t0_r2, issues.`subject` AS t0_r3,
issues.`description` AS t0_r4, issues.`due_date` AS t0_r5, issues.`category_id` AS t0_r6, issues.`status_id` AS t0_r7,
issues.`assigned_to_id` AS t0_r8, issues.`priority_id` AS t0_r9, issues.`fixed_version_id` AS t0_r10, issues.`author_id`
AS t0_r11, issues.`lock_version` AS t0_r12, issues.`created_on` AS t0_r13, issues.`updated_on` AS t0_r14, issues.`start_date`
AS t0_r15, issues.`done_ratio` AS t0_r16, issues.`estimated_hours` AS t0_r17, users.`id` AS t1_r0, users.`login` AS
t1_r1, users.`hashed_password` AS t1_r2, users.`firstname` AS t1_r3, users.`lastname` AS t1_r4, users.`mail` AS t1_r5,
users.`mail_notification` AS t1_r6, users.`admin` AS t1_r7, users.`status` AS t1_r8, users.`last_login_on` AS t1_r9,
users.`language` AS t1_r10, users.`auth_source_id` AS t1_r11, users.`created_on` AS t1_r12, users.`updated_on` AS t1_r13,
assigned_tos_issues.`id` AS t2_r0, assigned_tos_issues.`login` AS t2_r1, assigned_tos_issues.`hashed_password` AS t2_r2,
assigned_tos_issues.`firstname` AS t2_r3, assigned_tos_issues.`lastname` AS t2_r4, assigned_tos_issues.`mail` AS t2_r5,
assigned_tos_issues.`mail_notification` AS t2_r6, assigned_tos_issues.`admin` AS t2_r7, assigned_tos_issues.`status`
AS t2_r8, assigned_tos_issues.`last_login_on` AS t2_r9, assigned_tos_issues.`language` AS t2_r10,
assigned_tos_issues.`auth_source_id` AS t2_r11, assigned_tos_issues.`created_on` AS t2_r12, assigned_tos_issues.`updated_on`
AS t2_r13, issue_statuses.`id` AS t3_r0, issue_statuses.`name` AS t3_r1, issue_statuses.`is_closed` AS t3_r2,
issue_statuses.`is_default` AS t3_r3, issue_statuses.`position` AS t3_r4, trackers.`id` AS t4_r0, trackers.`name` AS
t4_r1, trackers.`is_in_chlog` AS t4_r2, trackers.`position` AS t4_r3, trackers.`is_in_roadmap` AS t4_r4, projects.`id`
AS t5_r0, projects.`name` AS t5_r1, projects.`description` AS t5_r2, projects.`homepage` AS t5_r3, projects.`is_public`
AS t5_r4, projects.`parent_id` AS t5_r5, projects.`projects_count` AS t5_r6, projects.`created_on` AS t5_r7,
projects.`updated_on` AS t5_r8, projects.`identifier` AS t5_r9, projects.`status` AS t5_r10, enumerations.`id` AS t6_r0,
enumerations.`opt` AS t6_r1, enumerations.`name` AS t6_r2, enumerations.`position` AS t6_r3, enumerations.`is_default`
AS t6_r4, issue_categories.`id` AS t7_r0, issue_categories.`project_id` AS t7_r1, issue_categories.`name` AS t7_r2,
issue_categories.`assigned_to_id` AS t7_r3
FROM issues
LEFT OUTER JOIN users ON = issues.author_id
LEFT OUTER JOIN users assigned_tos_issues ON = issues.assigned_to_id
LEFT OUTER JOIN issue_statuses ON = issues.status_id
LEFT OUTER JOIN trackers ON = issues.tracker_id
LEFT OUTER JOIN projects ON = issues.project_id
LEFT OUTER JOIN enumerations ON = issues.priority_id
LEFT OUTER JOIN issue_categories ON = issues.category_id
issues.project_id =1
issue_statuses.is_closed =0
ORDER BY users.lastname ASC
LIMIT 0 , 25 =================================================================
Because of 'LEFT OUTER JOIN users ON = issues.author_id' and
'ORDER BY users.lastname ASC' comment, it sorted by author_id.lastname

I think that issues_controller.rb is modified at line 52

:include => [ :author, :assigned_to, :status, :tracker, :project, :priority, :category ],
--> :include => [ :assigned_to, :author, :status, :tracker, :project, :priority, :category ],



#1 Updated by zeous park over 11 years ago

sorry :-)

our redmine is modified about issue list for displaing

it's our redmine bug

ps. i can't delete my report..

Also available in: Atom PDF