From b29cf5a6bb2baaa9a15d9e4f9f768ac2c0dc1d6e Mon Sep 17 00:00:00 2001 From: Kabiru Mwenja Date: Fri, 29 May 2026 20:10:34 +0300 Subject: [PATCH] Correct acts_as_event usage note and tighten followItem spec arg type The header comment claimed search did not rely on acts_as_event; the server-rendered search results page builds its work package links through WorkPackage#event_url, so the note now reflects that search and atom feeds both depend on it while the Activities subsystem uses its own providers. Type the followItem spec helper from the method signature instead of unknown, so the test states the argument contract explicitly. --- .../input/global-search-input.component.spec.ts | 2 +- lib_static/plugins/acts_as_event/lib/acts_as_event.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/core/global_search/input/global-search-input.component.spec.ts b/frontend/src/app/core/global_search/input/global-search-input.component.spec.ts index 6ee4354bb3c..0549b10ecf4 100644 --- a/frontend/src/app/core/global_search/input/global-search-input.component.spec.ts +++ b/frontend/src/app/core/global_search/input/global-search-input.component.spec.ts @@ -37,7 +37,7 @@ describe('GlobalSearchInputComponent#followItem', () => { let searchInScopeArgs:string[]; let context:Pick & { searchInScope:(scope:string) => void }; - function callFollowItem(item:unknown):void { + function callFollowItem(item:Parameters[0]):void { GlobalSearchInputComponent.prototype.followItem.call(context, item); } diff --git a/lib_static/plugins/acts_as_event/lib/acts_as_event.rb b/lib_static/plugins/acts_as_event/lib/acts_as_event.rb index 1d3e6ea9040..c8199c1d54a 100644 --- a/lib_static/plugins/acts_as_event/lib/acts_as_event.rb +++ b/lib_static/plugins/acts_as_event/lib/acts_as_event.rb @@ -28,9 +28,9 @@ # See COPYRIGHT and LICENSE files for more details. #++ -# This now only seems to be used when rendering atom responses. -# Search as well as activities do not rely on it. -# Thus, whenever an atom link is removed for a resource, acts_as_event within that model can also be removed. +# The event_* methods defined here power the server-rendered search results page +# and atom feeds. The Activities subsystem renders through its own providers, so +# a model can drop acts_as_event only once neither search nor atom references it. module Redmine module Acts