Project

General

Profile

Actions

Defect #39443

closed

Invalid statement query error on MSSQL when role filter is used in issues query

Added by Marius BĂLTEANU 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
Database
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

The following tests are failing on MS SQL. Unfortunately, I don't have a MS SQL local environment (M1 Mac) to take a quick look to it.

At the same time, maybe it's better to drop support for SQL on Redmine 6.0 and stick only with MySQL and PostgreSQL.

Error:
QueryTest#test_assigned_to_role_filter_should_search_assigned_to_for_users_without_the_Role:
Query::StatementInvalid: TinyTds::Error: An expression of non-boolean type specified in a context where a condition is expected, near ','.
    app/models/issue_query.rb:424:in `rescue in issues'
    app/models/issue_query.rb:380:in `issues'
    test/unit/query_test.rb:161:in `block in assert_query_result'
    test/unit/query_test.rb:160:in `assert_query_result'
    test/unit/query_test.rb:2898:in `block in <class:QueryTest>'
rails test test/unit/query_test.rb:2894
................................................................E
Error:
QueryTest#test_assigned_to_role_filter_should_search_assigned_to_for_users_with_the_Role_on_the_issue_project:
Query::StatementInvalid: TinyTds::Error: An expression of non-boolean type specified in a context where a condition is expected, near ','.
    app/models/issue_query.rb:424:in `rescue in issues'
    app/models/issue_query.rb:380:in `issues'
    test/unit/query_test.rb:161:in `block in assert_query_result'
    test/unit/query_test.rb:160:in `assert_query_result'
    test/unit/query_test.rb:2883:in `block in <class:QueryTest>'
rails test test/unit/query_test.rb:2877
...............................................................................E
Error:
QueryTest#test_assigned_to_role_filter_should_return_an_empty_set_with_empty_role:
Query::StatementInvalid: TinyTds::Error: An expression of non-boolean type specified in a context where a condition is expected, near ','.
    app/models/issue_query.rb:424:in `rescue in issues'
    app/models/issue_query.rb:380:in `issues'
    test/unit/query_test.rb:161:in `block in assert_query_result'
    test/unit/query_test.rb:160:in `assert_query_result'
    test/unit/query_test.rb:2891:in `block in <class:QueryTest>'
rails test test/unit/query_test.rb:2886
...................................E
Error:
QueryTest#test_assigned_to_role_filter_should_search_assigned_to_for_users_with_the_Role:
Query::StatementInvalid: TinyTds::Error: An expression of non-boolean type specified in a context where a condition is expected, near ','.
    app/models/issue_query.rb:424:in `rescue in issues'
    app/models/issue_query.rb:380:in `issues'
    test/unit/query_test.rb:161:in `block in assert_query_result'
    test/unit/query_test.rb:160:in `assert_query_result'
    test/unit/query_test.rb:2874:in `block in <class:QueryTest>'
rails test test/unit/query_test.rb:2870
.............................................................E
Error:
QueryTest#test_assigned_to_role_filter_should_return_issues_with_!_empty_role:
Query::StatementInvalid: TinyTds::Error: An expression of non-boolean type specified in a context where a condition is expected, near ','.
    app/models/issue_query.rb:424:in `rescue in issues'
    app/models/issue_query.rb:380:in `issues'
    test/unit/query_test.rb:161:in `block in assert_query_result'
    test/unit/query_test.rb:160:in `assert_query_result'
    test/unit/query_test.rb:2920:in `block in <class:QueryTest>'
rails test test/unit/query_test.rb:2915

Related issues

Related to Redmine - Patch #38319: Optimize IssueQuery#sql_for_assigned_to_role_field for PostgreSQL performanceClosedGo MAEDA

Actions
Actions

Also available in: Atom PDF