diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index f24959c4bac2..9396ea921b61 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1535,6 +1535,11 @@ function getModifiedExpenseMessage(reportAction) { if (hasModifiedMerchant) { return getProperSchemaForModifiedExpenseMessage(reportActionOriginalMessage.merchant, reportActionOriginalMessage.oldMerchant, Localize.translateLocal('common.merchant'), true); } + + const hasModifiedCategory = _.has(reportActionOriginalMessage, 'oldCategory') && _.has(reportActionOriginalMessage, 'category'); + if (hasModifiedCategory) { + return getProperSchemaForModifiedExpenseMessage(reportActionOriginalMessage.category, reportActionOriginalMessage.oldCategory, Localize.translateLocal('common.category'), true); + } } /** @@ -1575,6 +1580,11 @@ function getModifiedExpenseOriginalMessage(oldTransaction, transactionChanges, i originalMessage.currency = lodashGet(transactionChanges, 'currency', originalMessage.oldCurrency); } + if (_.has(transactionChanges, 'category')) { + originalMessage.oldCategory = TransactionUtils.getCategory(oldTransaction); + originalMessage.category = transactionChanges.category; + } + return originalMessage; }