Defect #30210

Application crash when deleting an issue from issue list with SQLServer

Added by Nigel Wilson 8 months ago. Updated 8 months ago.

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

0%

Category:Issues
Target version:-
Resolution: Affected version:4.0.0

Description

When viewing the list of issues, right-click the issue to be deleted, and then click delete. Redmine crashes with a "500 Internal Server Error".

Error log:

ActiveRecord::StatementInvalid (TinyTds::Error: The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP,
OFFSET or FOR XML is also specified.: EXEC sp_executesql N'DELETE FROM [custom_values] WHERE [custom_values].[id] IN (SELECT [custom_values].[id] FROM [custom_values] LEFT
OUTER JOIN [custom_fields] ON [custom_fields].[id] = [custom_values].[custom_field_id] WHERE [custom_values].[customized_id] = @0 AND [custom_values].[customized_type] = @1
ORDER BY custom_fields.position); SELECT @@ROWCOUNT AS AffectedRows', N'@0 int, @1 nvarchar(30)', @0 = 13895, @1 = N'Issue'):`
Environment:
  Redmine version                4.0.0.devel (cloned from GIT master branch)
  Ruby version                   2.5.3-p105 (2018-10-18) [x64-mingw32]
  Rails version                  5.2.2
  Environment                    production
  Database adapter               SQLServer
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Git                            2.20.0
  Filesystem
Redmine plugins:
  redmine_agile                  1.4.7

Related issues

Related to Redmine - Defect #30285: Microsoft SQL server support is broken New

History

#1 Updated by Jean-Philippe Lang 8 months ago

  • Subject changed from Application crash when deleting an issue from issue list to Application crash when deleting an issue from issue list with SQLServer

#2 Updated by Go MAEDA 8 months ago

  • Related to Defect #30211: Crash with the message "undefined method `alias_method_chain'" when connecting to Microsoft SQL Server added

#3 Updated by Nigel Wilson 8 months ago

Hi Go MAEDA, this issue isn't related (in my opinion) to Defect #30211.

This issue occurs once Redmine is up and running. Users were accessing the website and creating/updating tickets as normal. The error reported only occurred when trying to delete a ticket.

#4 Updated by Go MAEDA 8 months ago

  • Related to Defect #30285: Microsoft SQL server support is broken added

#5 Updated by Go MAEDA 8 months ago

  • Related to deleted (Defect #30211: Crash with the message "undefined method `alias_method_chain'" when connecting to Microsoft SQL Server)

Also available in: Atom PDF