diff --git a/app/controllers/work_packages/auto_completes_controller.rb b/app/controllers/work_packages/auto_completes_controller.rb index 7fd1ef456b2..db5be40c50d 100644 --- a/app/controllers/work_packages/auto_completes_controller.rb +++ b/app/controllers/work_packages/auto_completes_controller.rb @@ -60,10 +60,11 @@ class WorkPackages::AutoCompletesController < ApplicationController # `displayId` collapses to the numeric id in classic mode and to the # semantic identifier in semantic mode. The CKEditor mention plugin # reads it to insert `#PROJ-7` (or `#1234`) into the markdown source - # and to build the mention's link URL. + # and to build the mention's link URL. Stringified for parity with + # APIv3 (`WorkPackageRepresenter` serialises `displayId` as a string). work_package.attributes.merge( "to_s" => work_package.to_s, - "displayId" => work_package.display_id + "displayId" => work_package.display_id.to_s ) end end