Project

General

Profile

Actions

Defect #13110

closed

Double order by prevents documents from working in MSSQL

Added by Ryan Eberly almost 12 years ago. Updated almost 12 years ago.

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

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

We are using FreeTDS with SQL Server 2012 (on windows server)

documents_controller.rb:
def show
@attachments = @document.attachments.find(:all, :order => "created_on DESC")
end

this results in the sql query having 'created_on' appear twice in the order by clause that activerecord generates- which is illegal in SQL Server. My fix was to remove the :order in the document_controller show function.

Environment:
Redmine version 2.2.2.stable
Ruby version 1.9.3 (i386-mingw32)
Rails version 3.2.11
Environment production
Database adapter SQLServer
Redmine plugins:
goodville_redmine 0.0.1
redmine_contacts 3.1.1-light
redmine_mylyn_connector 2.8.2.stable
redmine_plugin_views_revisions 0.0.1


Related issues

Related to Redmine - Feature #12713: Microsoft SQLServer supportClosedJean-Philippe Lang

Actions
Actions #1

Updated by Daniel Felix almost 12 years ago

  • Target version set to 2.3.0

This relates to #12713 and should be fixed before Redmine 2.3 release which introduce SQL Server support.

Can someone check this?

Actions #2

Updated by Etienne Massip almost 12 years ago

  • Status changed from New to Closed
  • Target version deleted (2.3.0)

2.2.2.stable does not support MSSQL, this is not related to trunk / 2.3.0 code.

Actions #3

Updated by Etienne Massip almost 12 years ago

  • Resolution set to Invalid
Actions

Also available in: Atom PDF