mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
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.
This commit is contained in:
@@ -37,7 +37,7 @@ describe('GlobalSearchInputComponent#followItem', () => {
|
||||
let searchInScopeArgs:string[];
|
||||
let context:Pick<GlobalSearchInputComponent, 'wpPath'|'selectedItem'> & { searchInScope:(scope:string) => void };
|
||||
|
||||
function callFollowItem(item:unknown):void {
|
||||
function callFollowItem(item:Parameters<GlobalSearchInputComponent['followItem']>[0]):void {
|
||||
GlobalSearchInputComponent.prototype.followItem.call(context, item);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user