Redmine 4.2.7 still does not support DB triggers with MS SQL Server. When will this bug be fixed?
Successfully installed Redmine v4.2.7 on Windows with MS SQL Server does not support triggers!!! Compared to previous version v2.5.x everything was great - all triggers on DB tables work fine.
OS Windows 2016, DBMS SQL Server 2017 Standard. Environment: Redmine version 4.2.7.stable Ruby version 2.7.6-p219 (2022-04-12) [x64-mingw32] Rails version 5.2.8 Environment production Database adapter SQLServer Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp
In my case triggers on DB/tables mandatory requirement!
When create an issue and press Save button, return error 500.
Completed 500 Internal Server Error in 356ms (ActiveRecord: 164.3ms) ActiveRecord::StatementInvalid (TinyTds::Error: The target table 'custom_values' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.: EXEC sp_executesql N'INSERT INTO [custom_values] ([customized_type], [customized_id], [custom_field_id], [value]) OUTPUT INSERTED.[id] VALUES (@0, @1, @2, @3)', N'@0 nvarchar(30), @1 int, @2 int, @3 nvarchar(max)', @0 = N'Issue', @1 = 33480, @2 = 65, @3 = N''): app/models/issue.rb:227:in `create_or_update' app/controllers/issues_controller.rb:143:in `create' lib/redmine/sudo_mode.rb:61:in `sudo_mode'
I remember that this was already planned to be fixed: The target table 'custom_values' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.
When will this bug be fixed? What version will this fix be in?¶
RE: Redmine 4.2.7 does not support DB triggers with MS SQL Server. When will this bug be fixed? - Added by Pavel Rosický 3 months ago
try a workaround (I didn't test it) https://github.com/rails-sqlserver/activerecord-sqlserver-adapter#identity-inserts-with-triggers