Skip to content
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

[HOLD for payment 2024-10-25] [$250] Android-IOU-Tapping thread reply of expense hold offline, hmm not here displayed briefly #49268

Closed
1 of 6 tasks
IuliiaHerets opened this issue Sep 16, 2024 · 24 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 16, 2024

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: V9. 0.35-0
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause Internal Team

Action Performed:

  1. Launch app
  2. Open 1:1 with an user
  3. Go offline
  4. Create a expense
  5. Long press the expense to hold and unhold the expense
  6. Open the expense
  7. Tap header -- delete expense
  8. Go online
  9. Note deleted message with thread reply displayed little delay
  10. Tap on reply

Expected Result:

Tapping thread reply of expense hold offline, hmm not here must not be displayed briefly.

Actual Result:

Tapping thread reply of expense hold offline, hmm not here displayed briefly.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6603791_1726340489562.Screenrecorder-2024-09-15-00-16-07-413.2.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021837165313806139268
  • Upwork Job ID: 1837165313806139268
  • Last Price Increase: 2024-09-27
  • Automatic offers:
    • akinwale | Reviewer | 104226323
    • nkdengineer | Contributor | 104226325
Issue OwnerCurrent Issue Owner: @muttmuure
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 16, 2024
Copy link

melvin-bot bot commented Sep 16, 2024

Triggered auto assignment to @muttmuure (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.

@IuliiaHerets
Copy link
Author

@muttmuure 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

@nkdengineer
Copy link
Contributor

@IuliiaHerets The video in OP doesn't match the step. Can you please update the video?

@muttmuure
Copy link
Contributor

No overdue

@IuliiaHerets
Copy link
Author

Uploaded a correct video, sorry for it

@melvin-bot melvin-bot bot added the Overdue label Sep 19, 2024
@muttmuure muttmuure added the External Added to denote the issue can be worked on by a contributor label Sep 20, 2024
@melvin-bot melvin-bot bot changed the title Android-IOU-Tapping thread reply of expense hold offline, hmm not here displayed briefly [$250] Android-IOU-Tapping thread reply of expense hold offline, hmm not here displayed briefly Sep 20, 2024
Copy link

melvin-bot bot commented Sep 20, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021837165313806139268

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 20, 2024
Copy link

melvin-bot bot commented Sep 20, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)

@melvin-bot melvin-bot bot removed the Overdue label Sep 20, 2024
Copy link

melvin-bot bot commented Sep 23, 2024

@akinwale, @muttmuure Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Sep 23, 2024
@nkdengineer
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Tapping thread reply of expense hold offline, hmm not here displayed briefly.

What is the root cause of that problem?

  1. When we hold the transaction, we have an add comment but we don't update the childVisibleActionCount of parent report action then when we delete the money request, the iouReport is marked as pending delete in offline and it's cleared in success data here

App/src/libs/actions/IOU.ts

Lines 5956 to 5960 in 48e9c17

if (shouldDeleteIOUReport) {
successData.push({
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport?.reportID}`,
value: null,

What changes do you think we should make in order to solve the problem?

When we hold a transaction here, we should update parentReportAction in optimistic data by using getOptimisticDataForParentReportAction function as we do in other places

const optimisticParentReportActions = ReportUtils.getOptimisticDataForParentReportAction(reportID, currentTime, 'add');
optimisticParentReportActions.forEach((optimisticParentReportAction) => {
    if (!optimisticParentReportAction) {
        return;
    }
    optimisticData.push(optimisticParentReportAction);
});

function putOnHold(transactionID: string, comment: string, reportID: string) {

We also have another problem after doing that, the expense report still displays as the combined report. The RCA is we don't check the singleAction is deleted or not. To fix that we should return early if the singleAction is deleted

if (((originalMessage?.deleted ?? '') !== '' || isDeletedAction(singleAction)) && isMoneyRequestAction(singleAction)) {
    return;
}

if ((originalMessage?.deleted ?? '') !== '' && isMoneyRequestAction(singleAction)) {

What alternative solutions did you explore? (Optional)

Result

Screen.Recording.2024-09-25.at.14.29.32.mov

@muttmuure
Copy link
Contributor

@akinwale proposal above for you

@muttmuure muttmuure added Weekly KSv2 and removed Daily KSv2 labels Sep 25, 2024
@melvin-bot melvin-bot bot removed the Overdue label Sep 25, 2024
@muttmuure muttmuure added Daily KSv2 and removed Weekly KSv2 labels Sep 25, 2024
Copy link

melvin-bot bot commented Sep 27, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Sep 30, 2024

@akinwale, @muttmuure Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Sep 30, 2024
@akinwale
Copy link
Contributor

akinwale commented Oct 2, 2024

@nkdengineer's proposal works here.

🎀👀🎀 C+ reviewed.

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2024
Copy link

melvin-bot bot commented Oct 2, 2024

Triggered auto assignment to @srikarparsi, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 2, 2024
Copy link

melvin-bot bot commented Oct 2, 2024

📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Oct 2, 2024

📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 3, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 18, 2024
@melvin-bot melvin-bot bot changed the title [$250] Android-IOU-Tapping thread reply of expense hold offline, hmm not here displayed briefly [HOLD for payment 2024-10-25] [$250] Android-IOU-Tapping thread reply of expense hold offline, hmm not here displayed briefly Oct 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 18, 2024
Copy link

melvin-bot bot commented Oct 18, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Oct 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.50-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-10-25. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Oct 18, 2024

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:

  • [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@akinwale] Determine if we should create a regression test for this bug.
  • [@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@muttmuure] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@akinwale
Copy link
Contributor

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:

  • [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

Not a regression.

  • [@akinwale] Determine if we should create a regression test for this bug.
  • [@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Steps

  1. Launch Expensify
  2. Open or start a 1:1 chat with a user
  3. Go offline
  4. Create an expense
  5. Select or long-press the expense, and then Hold the expense
  6. Unhold the expense
  7. Open the expense
  8. Tap the header and select Delete expense
  9. Go online
  10. Verify that the deleted message with thread reply is displayed after a small delay
  11. Tap on reply
  12. Verify that tapping reply to the thread of the expense that was held offline does not cause the hmm not here must page to be displayed.

Do we agree 👍 or 👎?

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 25, 2024
Copy link

melvin-bot bot commented Oct 28, 2024

@akinwale, @muttmuure, @srikarparsi, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Oct 28, 2024
Copy link

melvin-bot bot commented Oct 30, 2024

@akinwale, @muttmuure, @srikarparsi, @nkdengineer Huh... This is 4 days overdue. Who can take care of this?

@nkdengineer
Copy link
Contributor

@muttmuure We're ready for payment here.

@muttmuure
Copy link
Contributor

Paid

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

5 participants