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 2023-11-13] [$500] IOU - Green dot in 1:1 DM in LHN does not disappear after paying the IOU offline #30848

Closed
6 tasks done
kbecciv opened this issue Nov 3, 2023 · 17 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Nov 3, 2023

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.3.95.0
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. [User B] Request money from User A.
  3. [User A] Go offline.
  4. [User A] Pay the IOU requested by User B.
  5. [User A] Go to LHN.

Expected Result:

The green dot in 1:1 DM in LHN will disappear after paying the IOU.

Actual Result:

The green dot in 1:1 DM in LHN does not disappear after paying the IOU offline. It only disappears after returning online.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Bug6262312_1699019558183.20231103_214903.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01310266fc6c713472
  • Upwork Job ID: 1721559941023154176
  • Last Price Increase: 2023-11-06
  • Automatic offers:
    • aimane-chnaif | Contributor | 27548566
    • DylanDylann | Contributor | 27548568
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Nov 3, 2023
@OSBotify
Copy link
Contributor

OSBotify commented Nov 3, 2023

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Nov 3, 2023

Triggered auto assignment to @Li357 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@DylanDylann
Copy link
Contributor

DylanDylann commented Nov 3, 2023

Proposal

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

Green dot in 1:1 DM in LHN does not disappear after paying the IOU offline

What is the root cause of that problem?

We are using hasOutstandingChildRequest as a flag to display green dot

if (option.hasOutstandingChildRequest) {

In payMoneyRequest function, we don't reset hasOutstandingChildRequest to false in optimisticdata of report

App/src/libs/actions/IOU.js

Lines 2445 to 2455 in bc9cb8f

onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport.reportID}`,
value: {
...chatReport,
lastReadTime: DateUtils.getDBTime(),
lastVisibleActionCreated: optimisticIOUReportAction.created,
hasOutstandingIOU: false,
iouReportID: null,
lastMessageText: optimisticIOUReportAction.message[0].text,
lastMessageHtml: optimisticIOUReportAction.message[0].html,
},

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

We need to add hasOutstandingChildRequest to false in optimisticdata here

App/src/libs/actions/IOU.js

Lines 2445 to 2455 in bc9cb8f

onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport.reportID}`,
value: {
...chatReport,
lastReadTime: DateUtils.getDBTime(),
lastVisibleActionCreated: optimisticIOUReportAction.created,
hasOutstandingIOU: false,
iouReportID: null,
lastMessageText: optimisticIOUReportAction.message[0].text,
lastMessageHtml: optimisticIOUReportAction.message[0].html,
},

App/src/libs/actions/IOU.js

Lines 2468 to 2476 in bc9cb8f

onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`,
value: {
...iouReport,
lastMessageText: optimisticIOUReportAction.message[0].text,
lastMessageHtml: optimisticIOUReportAction.message[0].html,
hasOutstandingIOU: false,
statusNum: CONST.REPORT.STATUS.REIMBURSED,
},

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Nov 6, 2023
@puneetlath
Copy link
Contributor

@DylanDylann that sounds good. Are you able to raise a PR asap?

@puneetlath puneetlath added the External Added to denote the issue can be worked on by a contributor label Nov 6, 2023
@melvin-bot melvin-bot bot changed the title IOU - Green dot in 1:1 DM in LHN does not disappear after paying the IOU offline [$500] IOU - Green dot in 1:1 DM in LHN does not disappear after paying the IOU offline Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

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

@DylanDylann
Copy link
Contributor

DylanDylann commented Nov 6, 2023

@puneetlath Oke I can raise PR now

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

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

@puneetlath
Copy link
Contributor

How's it going @DylanDylann?

@DylanDylann
Copy link
Contributor

@puneetlath I am completing screenshot test

@DylanDylann
Copy link
Contributor

Just now I thought I needed to wait for C+ review to be able to raise PR 😄

@puneetlath
Copy link
Contributor

Ah yeah, sorry for any confusion. I'm moving a little quicker here since this is a deploy blocker.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 Overdue labels Nov 6, 2023
@DylanDylann
Copy link
Contributor

@puneetlath @cubuspl42 The PR is ready for review #30918

@puneetlath puneetlath removed the DeployBlockerCash This issue or pull request should block deployment label Nov 6, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Nov 6, 2023
@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Nov 6, 2023
@melvin-bot melvin-bot bot changed the title [$500] IOU - Green dot in 1:1 DM in LHN does not disappear after paying the IOU offline [HOLD for payment 2023-11-13] [$500] IOU - Green dot in 1:1 DM in LHN does not disappear after paying the IOU offline Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.95-9 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 2023-11-13. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

@puneetlath puneetlath assigned aimane-chnaif and unassigned cubuspl42 Nov 6, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

📣 @aimane-chnaif 🎉 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 📖

@puneetlath puneetlath assigned puneetlath and DylanDylann and unassigned Li357 Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

📣 @DylanDylann 🎉 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 Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels Nov 13, 2023
@puneetlath
Copy link
Contributor

All paid. Thanks everyone!

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 Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants