diff --git a/src/lib/addons/__snapshots__/feature-event-formatter-md.test.ts.snap b/src/lib/addons/__snapshots__/feature-event-formatter-md.test.ts.snap index 88fd96d3c7..255b5d130c 100644 --- a/src/lib/addons/__snapshots__/feature-event-formatter-md.test.ts.snap +++ b/src/lib/addons/__snapshots__/feature-event-formatter-md.test.ts.snap @@ -19,7 +19,7 @@ exports[`Should format specialised text for events when a scheduled change reque exports[`Should format specialised text for events when change request is scheduled 1`] = ` { "label": "Change request scheduled", - "text": "*user@company.com* scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* to be applied at in project *my-other-project*", + "text": "*user@company.com* scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* to be applied at 2024-06-01T10:03:11.549Z.", "url": "unleashUrl/projects/my-other-project/change-requests/1", } `; @@ -203,7 +203,7 @@ exports[`Should format specialised text for events when rollout percentage chang exports[`Should format specialised text for events when scheduled change request fails 1`] = ` { "label": "Scheduled change request failed", - "text": "*Failed* to apply the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com* in project *my-other-project*.", + "text": "*Failed* to apply the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com*.", "url": "unleashUrl/projects/my-other-project/change-requests/1", } `; @@ -211,7 +211,7 @@ exports[`Should format specialised text for events when scheduled change request exports[`Should format specialised text for events when scheduled change request succeeds 1`] = ` { "label": "Scheduled change request applied successfully", - "text": "*Successfully* applied the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com* in project *my-other-project*.", + "text": "*Successfully* applied the scheduled change request *[#1](unleashUrl/projects/my-other-project/change-requests/1)* for feature flag *[new-feature](unleashUrl/projects/my-other-project/features/new-feature)* in the *production* environment in project *[my-other-project](unleashUrl/projects/my-other-project)* by *user@company.com*.", "url": "unleashUrl/projects/my-other-project/change-requests/1", } `; diff --git a/src/lib/addons/feature-event-formatter-md-events.ts b/src/lib/addons/feature-event-formatter-md-events.ts index 3fd8f86675..3841b900c2 100644 --- a/src/lib/addons/feature-event-formatter-md-events.ts +++ b/src/lib/addons/feature-event-formatter-md-events.ts @@ -152,17 +152,17 @@ export const EVENT_MAP: Record = { }, [CHANGE_REQUEST_SCHEDULED]: { label: 'Change request scheduled', - action: '{{b}}{{user}}{{b}} scheduled change request {{changeRequest}} to be applied at {{event.data.scheduledDate}} in project {{b}}{{event.project}}{{b}}', + action: '{{b}}{{user}}{{b}} scheduled change request {{changeRequest}} to be applied at {{event.data.scheduledDate}}.', path: '/projects/{{event.project}}/change-requests/{{event.data.changeRequestId}}', }, [CHANGE_REQUEST_SCHEDULED_APPLICATION_SUCCESS]: { label: 'Scheduled change request applied successfully', - action: '{{b}}Successfully{{b}} applied the scheduled change request {{changeRequest}} by {{b}}{{user}}{{b}} in project {{b}}{{event.project}}{{b}}.', + action: '{{b}}Successfully{{b}} applied the scheduled change request {{changeRequest}} by {{b}}{{user}}{{b}}.', path: '/projects/{{event.project}}/change-requests/{{event.data.changeRequestId}}', }, [CHANGE_REQUEST_SCHEDULED_APPLICATION_FAILURE]: { label: 'Scheduled change request failed', - action: '{{b}}Failed{{b}} to apply the scheduled change request {{changeRequest}} by {{b}}{{user}}{{b}} in project {{b}}{{event.project}}{{b}}.', + action: '{{b}}Failed{{b}} to apply the scheduled change request {{changeRequest}} by {{b}}{{user}}{{b}}.', path: '/projects/{{event.project}}/change-requests/{{event.data.changeRequestId}}', }, [CHANGE_REQUEST_SCHEDULE_SUSPENDED]: { diff --git a/src/lib/addons/feature-event-formatter-md.test.ts b/src/lib/addons/feature-event-formatter-md.test.ts index bd8ee3a389..a3544138bf 100644 --- a/src/lib/addons/feature-event-formatter-md.test.ts +++ b/src/lib/addons/feature-event-formatter-md.test.ts @@ -510,6 +510,7 @@ const testCases: [string, IEvent][] = [ createdByUserId: SYSTEM_USER_ID, data: { changeRequestId: 1, + scheduledDate: '2024-06-01T10:03:11.549Z', }, preData: {}, tags: [],