Skip to content

Commit

Permalink
Blindly copy over category from original transaction when editing a t…
Browse files Browse the repository at this point in the history
…ransaction
  • Loading branch information
yuwenmemon committed Sep 8, 2023
1 parent 0e836df commit 178de50
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libs/TransactionUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ function getUpdatedTransaction(transaction, transactionChanges, isFromExpenseRep
updatedTransaction.receipt.state = CONST.IOU.RECEIPT_STATE.OPEN;
}

// Always copy over the category for now until we have a way to edit it (Will be implemented in https://github.com/Expensify/App/issues/24464)
updatedTransaction.category = transaction.category

updatedTransaction.pendingFields = {
...(_.has(transactionChanges, 'comment') && {comment: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE}),
...(_.has(transactionChanges, 'created') && {created: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE}),
Expand Down

0 comments on commit 178de50

Please sign in to comment.