-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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] Track expense - System message appears on wrong LHN report after changing merchant or desc #42858
Comments
Triggered auto assignment to @johncschuster ( |
We think that this bug might be related to #vip-vsp |
@johncschuster FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
ProposalPlease re-state the problem that we are trying to solve in this issue.System message (like changing of merchant) appears as subtitle of self DM in LHN. It should only appear as last message in the transaction thread and not in the selfDM in LHN. What is the root cause of that problem?This bug happens only when there is only one transaction in the self DM report. App/src/libs/OptionsListUtils.ts Lines 291 to 299 in 0cb2dc0
we merge the transaction thread report actions into IOU report actions if it is oneTransactionThreadReport so the last transaction of modified merchant is added into the report actions and set as the lastReportAction. In the present case of self DM, the lastMessage of modifying merchant appears on the LHN. But this merging of transaction thread report actions for single transaction reports is not applicable for self DM because unlike other reports the tracked expenses are shown as separate report actions here instead of a single report preview merging all IOUs as shown in other reports. Additionally, we don't see this report action of modifying merchant in the self DM report screen though the transaction report actions are added here as well
with transactionThreadReportActions obtained from onyx with the transactionThreadReportID passed from ReportScreen App/src/pages/home/ReportScreen.tsx Lines 331 to 334 in 0cb2dc0
This is because there is a check here when getting the getOneTransactionThreadReportID App/src/libs/ReportActionsUtils.ts Lines 878 to 887 in 0cb2dc0
and it returns null when the skipReportTypeCheck is passed as false as seen here for track expenses because it is not one of the actions being checked thereApp/src/pages/home/ReportScreen.tsx Line 332 in 0cb2dc0
whereas it is passed as true hereApp/src/libs/OptionsListUtils.ts Line 293 in 0cb2dc0
which skips the check. If the check is not skipped it returns null and LHN shows correct message.
What changes do you think we should make in order to solve the problem?We can check if the report is self DM and pass the boolean here App/src/libs/OptionsListUtils.ts Line 293 in 0cb2dc0
like const isSelfDM = ReportUtils.isSelfDM(ReportUtils.getReport(reportID));
// If the report is a one-transaction report and has , we need to return the combined reportActions so that the LHN can display modifications
// to the transaction thread or the report itself
const transactionThreadReportID = ReportActionUtils.getOneTransactionThreadReportID(reportID, actions[reportActions[0]], !isSelfDM);
What alternative solutions did you explore? (Optional)I see this skip of check added here in #39472 for showing correct messages in LHN for edge cases. I changed the skipcheck to App/src/libs/OptionsListUtils.ts Line 293 in 0cb2dc0
simply to const transactionThreadReportID = ReportActionUtils.getOneTransactionThreadReportID(reportID, actions[reportActions[0]], false); |
Job added to Upwork: https://www.upwork.com/jobs/~01e89fac46add8bf9d |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
Reviewing today. |
Triggered auto assignment to @NikkiWines, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I just double-checked this, and the behavior without the @allroundexperts @c3024 how does that sound to you? |
Yes, let's remove it. I don't think anything will be broken. |
📣 @c3024 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@allroundexperts PR ready for review! |
@johncschuster This was deployed to production 4 days ago but automation failed here. |
@johncschuster Can you please complete the payment here? This was deployed to production 10 days ago. Thanks! |
Contributor: @c3024 paid $250 via Upwork @allroundexperts can you fill out the BZ checklist plzzzz BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@johncschuster @NikkiWines @allroundexperts @c3024 this issue is now 4 weeks old, please consider:
Thanks! |
On to the checklist today. |
Checklist
Regression test
Verify that the system message indicating merchant or description being updated gets displayed on LHN for the combined report of the tracked expense only. Do we 👍 or 👎 ? |
$250 approved for @allroundexperts |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.77-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
System message indicating merchant or description being updated gets displayed on LHN for the combined report of the tracked expense only
Actual Result:
System message indicating merchant or description being updated is shown on the LHN of the personal space report
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6495857_1717054028787.bandicam_2024-05-30_10-20-30-005.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @allroundexpertsThe text was updated successfully, but these errors were encountered: