You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version Number: 9.1.87-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#67195 Email or phone of affected tester (no customers):applausetester+uo0729@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac/Sonoma, SamsungG S22/A14, iPhone 15 Pro App Component: Chat Report View
🚨 Edited by proposal-police: This proposal was edited at 2025-07-31 14:47:37 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
There are two problems:
The report change message (DELETEDTRANSACTION) is not returned by the backend when deleting an expense, if the report hasn't been submitted.
We do not optimistically add the report change message on the frontend when deleting an expense.
What is the root cause of that problem?
Problem 1: Missing DELETEDTRANSACTION from the backend
This is a backend-side issue. The root cause should be investigated and addressed there. It’s unclear whether this is a bug or intentional behavior (i.e., only returning DELETEDTRANSACTION actions for submitted reports).
Problem 2: Missing optimistic DELETEDTRANSACTION in the frontend
In this section of the code, we do not currently add a DELETEDTRANSACTION report action when an expense is deleted. As a result, users don’t see the action appear in the UI immediately.
What changes do you think we should make in order to solve the problem?
Problem 1: Missing DELETEDTRANSACTION from the backend
This should be handled by the backend. If the current behavior is intentional (i.e., only returning the DELETEDTRANSACTION action for submitted reports), that decision should be clarified and documented. If not, the backend should be updated to return the message for unsubmitted reports as well.
Problem 2: Missing optimistic DELETEDTRANSACTION in the frontend
We should add the following logic to optimistically create a DELETEDTRANSACTION action when an expense is deleted:
const currentUserAccountID = getCurrentUserAccountID();
const deletedTransactionAction: ReportAction = {
actionName: CONST.REPORT.ACTIONS.TYPE.DELETED_TRANSACTION,
actorAccountID: currentUserAccountID,
automatic: false,
created: DateUtils.getDBTime(),
isAttachmentOnly: false,
message: [
{
// Currently we are composing the message from the originalMessage and message is only used in OldDot and not in the App
text: 'You',
style: 'strong',
type: CONST.REPORT.MESSAGE.TYPE.TEXT,
},
],
originalMessage: {
amount: transaction?.amount,
currency: transaction?.currency,
merchant: transaction?.merchant,
},
person: [
{
style: 'strong',
text: currentUserPersonalDetails?.displayName ?? String(currentUserAccountID),
type: 'TEXT',
},
],
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
reportActionID: NumberUtils.rand64(),
reportID: transactionThread?.reportID,
shouldShow: true,
};
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${iouReport?.reportID}`,
value: {[deletedTransactionAction.reportActionID]: deletedTransactionAction},
});
Then we should revert the change in failureData, clear the pending action in successData.
Once the backend behavior for problem 1 is finalized, we can ensure the frontend conditionally applies this logic accordingly.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add test for deleteMoneyRequest to make sure the optimistic data contain the CONST.REPORT.ACTIONS.TYPE.DELETED_TRANSACTION action.
What alternative solutions did you explore? (Optional)
In case report hasn't been submitted, if we delete, BE doesn't return message for that event
What changes do you think we should make in order to solve the problem?
Create optimistic deleted transaction report action in ReportUtils.ts, by using this way, the code would be more easy to maintain and increase readability. We use this approach for almost every report actions
Noted: We still need BE help to update api to return correct data
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add test for buildOptimisticDeletedTransactionReportAction and deleteMoneyRequest
What alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
📣 @horodylova! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Activity
melvin-bot commentedon Jul 30, 2025
Triggered auto assignment to @NicMendonca (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.thelullabyy commentedon Jul 30, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-07-31 14:47:37 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
There are two problems:
DELETEDTRANSACTION) is not returned by the backend when deleting an expense, if the report hasn't been submitted.What is the root cause of that problem?
Problem 1: Missing
DELETEDTRANSACTIONfrom the backendThis is a backend-side issue. The root cause should be investigated and addressed there. It’s unclear whether this is a bug or intentional behavior (i.e., only returning
DELETEDTRANSACTIONactions for submitted reports).Problem 2: Missing optimistic
DELETEDTRANSACTIONin the frontendIn this section of the code, we do not currently add a
DELETEDTRANSACTIONreport action when an expense is deleted. As a result, users don’t see the action appear in the UI immediately.What changes do you think we should make in order to solve the problem?
Problem 1: Missing
DELETEDTRANSACTIONfrom the backendThis should be handled by the backend. If the current behavior is intentional (i.e., only returning the
DELETEDTRANSACTIONaction for submitted reports), that decision should be clarified and documented. If not, the backend should be updated to return the message for unsubmitted reports as well.Problem 2: Missing optimistic
DELETEDTRANSACTIONin the frontendWe should add the following logic to optimistically create a
DELETEDTRANSACTIONaction when an expense is deleted:Then we should revert the change in failureData, clear the pending action in successData.
Once the backend behavior for problem 1 is finalized, we can ensure the frontend conditionally applies this logic accordingly.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add test for deleteMoneyRequest to make sure the optimistic data contain the CONST.REPORT.ACTIONS.TYPE.DELETED_TRANSACTION action.
What alternative solutions did you explore? (Optional)
melvin-bot commentedon Jul 31, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021950922805670588908
[-]Report Chat - Report change messages don't appear in un-submitted reports[/-][+][$250] Report Chat - Report change messages don't appear in un-submitted reports[/+]melvin-bot commentedon Jul 31, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann (
External)lorretheboy commentedon Jul 31, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-07-31 14:38:48 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Report Chat - Report change messages don't appear in un-submitted reports
What is the root cause of that problem?
In case report hasn't been submitted, if we delete, BE doesn't return message for that event
What changes do you think we should make in order to solve the problem?
Create optimistic deleted transaction report action in
ReportUtils.ts, by using this way, the code would be more easy to maintain and increase readability. We use this approach for almost every report actionsAdd optimistic DELETEDTRANSACTION action to show the deletion message immediately for track expenses
App/src/libs/actions/IOU.ts
Lines 2984 to 2989 in c1edbf6
We should remove the pending action from the optimistic DELETEDTRANSACTION action
Remove optimistic data on failure
App/src/libs/actions/IOU.ts
Line 3071 in c1edbf6
App/src/libs/actions/IOU.ts
Line 3001 in c1edbf6
Can reuse
buildOptimisticDeletedTransactionReportActionto dd to here as wellApp/src/libs/actions/IOU.ts
Line 8127 in c1edbf6
Noted: We still need BE help to update api to return correct data
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add test for
buildOptimisticDeletedTransactionReportActionanddeleteMoneyRequestWhat alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
thelullabyy commentedon Jul 31, 2025
Proposal updated
horodylova commentedon Jul 31, 2025
Proposal
Contributor details
Expensify account email: hotodylova.sv@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/svitlanadev
Problem
When deleting an expense, no notification is shown, even though the expense is successfully removed.
Root Cause
The notification logic runs after the expense has already been deleted, making its data unavailable for display.
Proposed Changes
Trigger the notification before deleting the expense:
This ensures the user sees the confirmation message while the necessary data is still available.
Tests
Add tests to verify that a notification is displayed for various merchant and amount values when deleting an expense.
Alternatives
Add a slight delay between showing the notification and performing the deletion to preserve message semantics ("Deleted" instead of "Deleting").
melvin-bot commentedon Jul 31, 2025
📣 @horodylova! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
48 remaining items
[-][$250] Report Chat - Report change messages don't appear in un-submitted reports[/-][+][$125] Report Chat - Report change messages don't appear in un-submitted reports[/+]melvin-bot commentedon Sep 9, 2025
NicMendonca commentedon Sep 9, 2025
@thelullabyy I had to send you a new offer for the new price -- can you please accept?
NicMendonca commentedon Sep 9, 2025
Payment Summary
Contributor: @thelullabyy paid $125 via Upwork
Contributor+: @DylanDylann due $125 via NewDot
NicMendonca commentedon Sep 11, 2025
@thelullabyy can you please accept the Upwork offer?
thelullabyy commentedon Sep 12, 2025
@NicMendonca I've accepted it. Thanks!
NicMendonca commentedon Sep 12, 2025
Thanks! @thelullabyy done! ✅ @DylanDylann don't forget to request payment!
garrettmknight commentedon Oct 29, 2025
$125 approved for @DylanDylann