Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing timeline activity events #8459

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

martmull
Copy link
Contributor

@martmull martmull commented Nov 12, 2024

Fixes bug introduced in #8193

Taking into account linked event name linked-{eventName} as before issue

Before

linked-created and linked-updated activity targets were not created in timelineActivity table

After

linked-created and linked-updated activity targets are created in timelineActivity table

@martmull martmull marked this pull request as ready for review November 12, 2024 10:33
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR fixes missing timeline activity events by restoring the proper handling of linked event names and improving the event transformation logic.

  • Renamed TransformedEvent type to TimelineActivity with required name field in /packages/twenty-server/src/modules/timeline/services/timeline-activity.service.ts
  • Fixed event name propagation by ensuring linked-{eventName} format is preserved for linked activities
  • Renamed methods for clarity (e.g. processActivity -> computeActivities) to better reflect their purpose
  • Added proper handling of linked records through linkedRecordCachedName, linkedRecordId, and linkedObjectMetadataId fields

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +79 to +80
if (linkedTimelineActivities && linkedTimelineActivities?.length > 0)
return [...linkedTimelineActivities, { ...event, name: eventName }];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: redundant check - linkedTimelineActivities is already checked for truthiness

@charlesBochet charlesBochet merged commit aadcb49 into main Nov 12, 2024
19 checks passed
@charlesBochet charlesBochet deleted the fix-missing-linked-task/note-activities branch November 12, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants