-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[$250] Scan Receipt - No message when deleting a receipt from a scanned report #53998
Comments
Triggered auto assignment to @MitchExpensify ( |
Edited by proposal-police: This proposal was edited at 2024-12-12 15:48:23 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.When deleting the receipt no message is displayed in the conversation. What is the root cause of that problem?In the Report screen, there is logic to filter report actions here. When the App/src/libs/ReportActionsUtils.ts Lines 691 to 694 in 94ab9cd
App/src/libs/ReportActionsUtils.ts Lines 133 to 144 in 94ab9cd
What changes do you think we should make in order to solve the problem?We can update the condition in the
Alternatively, we can update here to minimize the risk of regression.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional)
|
Job added to Upwork: https://www.upwork.com/jobs/~021867401523775541525 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
seems like a backend issue to me 🎀👀🎀 but it looks like we can do it on frontend too? #53998 (comment) |
Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
Lines 2736 to 2742 in ff2fc94
but we didn't do it when detaching the receipt. What changes do you think we should make in order to solve the problem?
Lines 5263 to 5266 in ff2fc94
const expenseReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${transaction?.reportID}`] ?? null;
const updatedReportAction = ReportUtils.buildOptimisticDetachReceipt(expenseReport?.reportID ?? '-1');
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${updatedReportAction?.reportID}`,
value: {
[updatedReportAction.reportActionID]: updatedReportAction as OnyxTypes.ReportAction,
},
});
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${updatedReportAction?.reportID}`,
value: {
lastVisibleActionCreated: updatedReportAction.created,
lastReadTime: updatedReportAction.created,
},
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${updatedReportAction?.reportID}`,
value: {
lastVisibleActionCreated: expenseReport?.lastVisibleActionCreated,
lastReadTime: expenseReport?.lastReadTime,
},
});
successData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${expenseReport?.reportID}`,
value: {
[updatedReportAction.reportActionID]: {pendingAction: null},
},
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${expenseReport?.reportID}`,
value: {
[updatedReportAction.reportActionID]: {
...(updatedReportAction as OnyxTypes.ReportAction),
errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('iou.error.genericEditFailureMessage'),
},
},
});
const parameters: DetachReceiptParams = {transactionID, reportActionsID: updatedReportAction.reportActionID}; Line 7908 in ff2fc94
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?What alternative solutions did you explore? (Optional) |
@arosiclair, @rushatgabhane, @MitchExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Agreed I'll fix this internally. I'm not sure if we want offline support for this specifically, but I'll look into it. |
@arosiclair Do you think we need to handle offline case like we did when updating other transaction fields like amount, description, etc? Currently, when deleting a receipt offline, there is no "removed a receipt" message until we back online |
@arosiclair @rushatgabhane @MitchExpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
I posted a PR to fix the hidden message issue. We can add offline support next, but that will require more changes which I haven't written yet. @daledah you can start drafting changes in the meantime. The optimistic {
"originalMessage": {
"transactionID": 123,
"merchant": "${merchant}"
},
"message": [
{
"type": "COMMENT",
"html": "detached a receipt from expense '${merchant}'",
"text": "detached a receipt from expense '${merchant}'",
"whisperedTo": []
}
]
} |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.75-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5334039
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Windows 11 / Chrome
App Component: Workspace Settings
Action Performed:
Expected Result:
Verify a system message is posted in the conversation indicating the receipt was removed
Actual Result:
When deleting the receipt no message is displayed in the conversation.
It appears only after refreshing the page
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6691887_1733990857111.Nomessagewhendeletereciept.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @arosiclairThe text was updated successfully, but these errors were encountered: