Project

General

Profile

Actions

Defect #4302

closed

errors viewing tickets with sorting that can't be applied

Added by jerrett taylor over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Issues
Target version:
-
Start date:
2009-11-27
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

This seems to be due to the way redmine remembers settings you set for sorting, grouping, etc...

It's easy to reproduce - create a custom view of tickets, group by Target Version and order by Target Version, Desc

Then go to that view, and at the top of the page change the setting of "group by" to none and click "apply"

this will result in a 500 error because it's still trying to order by target version, but can't because it's not being joined

ActiveRecord::StatementInvalid (Mysql::Error: Unknown column 'versions.effective_date' in 'order clause': SELECT DISTINCT `issues`.id 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 projects.id = 2 AND projects.status=1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) ORDER BY versions.effective_date, versions.name LIMIT 0, 500):
app/controllers/issues_controller.rb:66:in `index'

This is 0.8 dev branch as of yesterday. This is the easiest way to reproduce it, but i've seen it crop up in various other ways as well - always seems to be similar cause though

Actions #1

Updated by Jean-Philippe Lang over 15 years ago

  • Category set to Issues
  • Status changed from New to Closed
  • Affected version (unused) set to devel
  • Resolution set to Fixed

Test added and r3072 reverted in r3097. Should be fixed.

Actions

Also available in: Atom PDF