mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #17957 from overleaf/ab-archive-test-slack-notif-date
[web] Send correct date for Slack notification when archiving a split test GitOrigin-RevId: acf39915e3362f90b431b6c973e1191428acd9c9
This commit is contained in:
parent
bee4c95c28
commit
cdf4f98c87
1 changed files with 3 additions and 3 deletions
|
@ -29,6 +29,8 @@ async function sendNotification(splitTest, action, user) {
|
|||
),
|
||||
].join('\n')
|
||||
|
||||
const date = splitTest.archived ? splitTest.archivedAt : lastVersion.createdAt
|
||||
|
||||
const payload = {
|
||||
name: splitTest.name,
|
||||
action,
|
||||
|
@ -38,9 +40,7 @@ async function sendNotification(splitTest, action, user) {
|
|||
variantsConfig,
|
||||
active: lastVersion.active.toString(),
|
||||
author: user.email,
|
||||
date:
|
||||
moment(lastVersion.createdAt).utc().format('Do MMM YYYY, h:mm a') +
|
||||
' UTC',
|
||||
date: moment(date).utc().format('Do MMM YYYY, h:mm a') + ' UTC',
|
||||
comment: lastVersion.comment ? `with comment: ${lastVersion.comment}` : '',
|
||||
versionNumber: `${lastVersion.versionNumber}`,
|
||||
url: `${Settings.siteUrl}/admin/split-test/edit/${splitTest.name}`,
|
||||
|
|
Loading…
Reference in a new issue