Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14174,6 +14174,10 @@ function updateSplitTransactions({
}
}

if (isReverseSplitOperation) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but I don't get why we delete transactionChanges.transactionID in this case, can you explain?
Also that was not the solution proposed in the proposal in the issue, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue solved in this PR is different from the original GH issue. It seems like the original GH issue is the expected behavior based on this comment. In this PR, we address case 2 from that comment to prevent showing any system message when user perform a reverse split and set the remaining expense back to its original amount

And then, we delete transactionChanges.transactionID when we reverse a split because the transactionID is different in this case. This causes the transactionID to remain in transactionChanges, and we get the "changed the expense" system message even when the user makes no change at all. I explained the detailed RCA and solution here

delete transactionChanges.transactionID;
}

if (Object.keys(transactionChanges).length > 0) {
const {onyxData: moneyRequestParamsOnyxData, params} = getUpdateMoneyRequestParams({
transactionID: existingTransactionID,
Expand Down