プロジェクト

全般

プロフィール

Vote #77442

完了

Malformed SQL query with SQLServer when grouping and sorting by fixed version

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues filter_56
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
56
version_id:
117
issue_org_id:
22808
author_id:
150440
assigned_to_id:
1
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
112
ステータス-->[Closed]

説明

Hi guys,

I had the same problem of issue #19544, but my was with the fixed version column, in version 3.2.1 with SQL Server 2012, and this r14207 did not solve my problem.

making a debug in the code, I found that the part where it should make a flatten between two Array, the variable group_by_sort_order comes as String, so I did a treatment to make this String into Array, and solved my problem.

code modified in /app/models/issue_query.rb


  # Returns the issues
  # Valid options are :order, :offset, :limit, :include, :conditions
  def issues(options={})
    if group_by_sort_order.is_a?(String)
      # convert String in Array
      order_option = [group_by_sort_order.split(','), options[:order]].flatten.reject(&:blank?)
    else
      order_option = [group_by_sort_order, options[:order]].flatten.reject(&:blank?)
    end

...

journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Fixed in r15416.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリIssues filter_56 にセット
  • 対象バージョン3.1.6_117 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0