Changed oldValue
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-10-21 14:05:14 +02:00
parent 537d61e27e
commit d3532608e1
1 changed files with 12 additions and 2 deletions

View File

@ -150,10 +150,20 @@ module.exports = Self => {
minute: '2-digit',
second: '2-digit'
}).format(value);
oldValue = value;
}
changesMade += `\r\n~${$t(change)}: ${value}~ ➔ *${$t(change)}: ${oldValue}*`;
if (oldValue instanceof Date) {
oldValue = new Intl.DateTimeFormat('es', {
year: '2-digit',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit'
}).format(oldValue);
}
changesMade += `\r\n~${$t(change)}: ${oldValue}~ ➔ *${$t(change)}: ${value}*`;
}
const message = $t('Changed this data from the ticket', {