diff --git a/app/controllers/work_packages/auto_completes_controller.rb b/app/controllers/work_packages/auto_completes_controller.rb index 35cc12c902..8b97289a58 100644 --- a/app/controllers/work_packages/auto_completes_controller.rb +++ b/app/controllers/work_packages/auto_completes_controller.rb @@ -50,7 +50,7 @@ class WorkPackages::AutoCompletesController < ApplicationController @work_packages |= scope.visible .where(sql_query) - .order(:id) + .order("#{WorkPackage.table_name}.id ASC") # :id does not work because... .limit(10) respond_to do |format|