Defect #44243 ยป fix-ArrayIntersect.diff
| app/models/issue_query.rb (working copy) | ||
|---|---|---|
| 406 | 406 |
def issues(options={})
|
| 407 | 407 |
order_option = [group_by_sort_order, (options[:order] || sort_clause)].flatten.reject(&:blank?) |
| 408 | 408 |
# The default order of IssueQuery is issues.id DESC(by IssueQuery#default_sort_criteria) |
| 409 |
unless ["#{Issue.table_name}.id ASC", "#{Issue.table_name}.id DESC"].any?{|i| order_option.include?(i)}
|
|
| 409 |
unless order_option.intersect?(["#{Issue.table_name}.id ASC", "#{Issue.table_name}.id DESC"])
|
|
| 410 | 410 |
order_option << "#{Issue.table_name}.id DESC"
|
| 411 | 411 |
end |
| 412 | 412 | |
| ... | ... | |
| 457 | 457 |
def issue_ids(options={})
|
| 458 | 458 |
order_option = [group_by_sort_order, (options[:order] || sort_clause)].flatten.reject(&:blank?) |
| 459 | 459 |
# The default order of IssueQuery is issues.id DESC(by IssueQuery#default_sort_criteria) |
| 460 |
unless ["#{Issue.table_name}.id ASC", "#{Issue.table_name}.id DESC"].any?{|i| order_option.include?(i)}
|
|
| 460 |
unless order_option.intersect?(["#{Issue.table_name}.id ASC", "#{Issue.table_name}.id DESC"])
|
|
| 461 | 461 |
order_option << "#{Issue.table_name}.id DESC"
|
| 462 | 462 |
end |
| 463 | 463 | |