:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(conversations): link ticket mention notifications to the ticket (#73510)
Xander38b170272961
diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/activity/buildNotificationSourcePath.test.ts b/frontend/src/layout/navigation-3000/sidepanel/panels/activity/buildNotificationSourcePath.test.tsindex d9b629dff87d..1c47f0605610 100644--- a/frontend/src/layout/navigation-3000/sidepanel/panels/activity/buildNotificationSourcePath.test.ts+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/activity/buildNotificationSourcePath.test.ts@@ -76,6 +76,16 @@ describe('buildNotificationSourcePath', () => {expect(result).toBe('/error_tracking/issue-uuid')})+ it('builds path from source_type and source_id for ticket', () => {+ const result = buildNotificationSourcePath(+ makeNotification({+ source_type: 'ticket',+ source_id: 'ticket-uuid',+ })+ )+ expect(result).toBe('/support/tickets/ticket-uuid')+ })+it('falls back to source_url when source_type is null', () => {const result = buildNotificationSourcePath(makeNotification({diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic.tsxindex f4221f5c764c..944c0baafa50 100644--- a/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic.tsx+++ b/frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic.tsx@@ -80,6 +80,7 @@ const SOURCE_TYPE_TO_PATH: Record<NotificationEventSourceTypeEnumApi, ((id: striexperiment: (id) => urls.experiment(id),error_tracking: (id) => urls.errorTrackingIssue(id),customer_analytics: null,+ ticket: (id) => urls.supportTicketDetail(id),}export interface NotificationGroup {diff --git a/posthog/models/comment/utils.py b/posthog/models/comment/utils.pyindex 1288334dea30..7a2f881a0473 100644--- a/posthog/models/comment/utils.py+++ b/posthog/models/comment/utils.py@@ -22,6 +22,9 @@ SCOPE_TO_SOURCE_TYPE: dict[str, str] = {"Survey": "survey","Experiment": "experiment","ErrorTracking": "error_tracking",+ # Unlike the PascalCase model-name scopes above, ticket comments are written with the literal+ # "conversations_ticket" scope (see products/conversations). This must match that literal.+ "conversations_ticket": "ticket",}SCOPE_TO_PATH_MAPPING: dict[str, str] = {@@ -32,6 +35,8 @@ SCOPE_TO_PATH_MAPPING: dict[str, str] = {"Dashboard": "/dashboard/{item_id}","Survey": "/surveys/{item_id}","Experiment": "/experiments/{item_id}",+ # See note above: ticket comments use the "conversations_ticket" scope literal, not "Ticket".+ "conversations_ticket": "/support/tickets/{item_id}",}diff --git a/products/notifications/backend/facade/enums.py b/products/notifications/backend/facade/enums.pyindex 0d11e3707e30..faae7903608b 100644--- a/products/notifications/backend/facade/enums.py+++ b/products/notifications/backend/facade/enums.py@@ -49,6 +49,7 @@ class SourceType(str, Enum):EXPERIMENT = "experiment"ERROR_TRACKING = "error_tracking"CUSTOMER_ANALYTICS = "customer_analytics"+ TICKET = "ticket"class NotificationOnlyResourceType(str, Enum):diff --git a/products/notifications/frontend/generated/api.schemas.ts b/products/notifications/frontend/generated/api.schemas.tsindex 291ed4e31249..21b8d261a290 100644--- a/products/notifications/frontend/generated/api.schemas.ts+++ b/products/notifications/frontend/generated/api.schemas.ts@@ -17,6 +17,7 @@* * `experiment` - EXPERIMENT* * `error_tracking` - ERROR_TRACKING* * `customer_analytics` - CUSTOMER_ANALYTICS+ * * `ticket` - TICKET*/export type NotificationEventSourceTypeEnumApi =(typeof NotificationEventSourceTypeEnumApi)[keyof typeof NotificationEventSourceTypeEnumApi]@@ -31,6 +32,7 @@ export const NotificationEventSourceTypeEnumApi = {Experiment: 'experiment',ErrorTracking: 'error_tracking',CustomerAnalytics: 'customer_analytics',+ Ticket: 'ticket',} as const/**diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex b862fbd3da6c..5a72db8cb9d7 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -39503,6 +39503,7 @@ export namespace Schemas {* * `experiment` - EXPERIMENT* * `error_tracking` - ERROR_TRACKING* * `customer_analytics` - CUSTOMER_ANALYTICS+ * * `ticket` - TICKET*/export type NotificationEventSourceTypeEnum = typeof NotificationEventSourceTypeEnum[keyof typeof NotificationEventSourceTypeEnum];@@ -39517,6 +39518,7 @@ export namespace Schemas {Experiment: 'experiment',ErrorTracking: 'error_tracking',CustomerAnalytics: 'customer_analytics',+ Ticket: 'ticket',} as const;export interface NotificationEvent {