mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-28 03:11:15 +00:00
Use regular AR query instead of raw SQL.
git-svn-id: http://svn.redmine.org/redmine/trunk@13496 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
44a5eedf8f
commit
41d81a09b3
@ -59,11 +59,8 @@ class Tracker < ActiveRecord::Base
|
||||
return []
|
||||
end
|
||||
|
||||
ids = WorkflowTransition.
|
||||
connection.select_rows("SELECT DISTINCT old_status_id, new_status_id FROM #{WorkflowTransition.table_name} WHERE tracker_id = #{id} AND type = 'WorkflowTransition'").
|
||||
flatten.
|
||||
uniq
|
||||
@issue_statuses = IssueStatus.where(:id => ids).to_a.sort
|
||||
status_ids = WorkflowTransition.where(:tracker_id => id).uniq.pluck(:old_status_id, :new_status_id).flatten.uniq
|
||||
@issue_statuses = IssueStatus.where(:id => status_ids).to_a.sort
|
||||
end
|
||||
|
||||
def disabled_core_fields
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user