Commit 5a279697 authored by Kerri Miller's avatar Kerri Miller

Merge branch '323730-remove-string-order-values' into 'master'

Remove string order values from scopes

See merge request gitlab-org/gitlab!84216
parents 2ba1442e 9c031822
......@@ -30,7 +30,7 @@ module Resolvers
GroupsFinder
.new(context[:current_user], args.merge(parent: parent))
.execute
.reorder('name ASC')
.reorder(name: :asc)
end
# rubocop: enable CodeReuse/ActiveRecord
end
......
......@@ -383,7 +383,7 @@ class Project < ApplicationRecord
has_many :source_pipelines, class_name: 'Ci::Sources::Pipeline', foreign_key: :project_id
has_many :import_failures, inverse_of: :project
has_many :jira_imports, -> { order 'jira_imports.created_at' }, class_name: 'JiraImportState', inverse_of: :project
has_many :jira_imports, -> { order(JiraImportState.arel_table[:created_at].asc) }, class_name: 'JiraImportState', inverse_of: :project
has_many :daily_build_group_report_results, class_name: 'Ci::DailyBuildGroupReportResult'
has_many :ci_feature_usages, class_name: 'Projects::CiFeatureUsage'
......
......@@ -37,7 +37,7 @@ module WorkItems
validates :icon_name, length: { maximum: 255 }
scope :default, -> { where(namespace: nil) }
scope :order_by_name_asc, -> { order('LOWER(name)') }
scope :order_by_name_asc, -> { order(arel_table[:name].lower.asc) }
scope :by_type, ->(base_type) { where(base_type: base_type) }
def self.default_by_type(type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment