Skip to content

[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

Description

@kbecciv

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

Activity

  1. OSBotify commented on Nov 3, 2023

    @OSBotify
    Contributor

    👋 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.
  2. melvin-bot commented on Nov 3, 2023

    @melvin-bot

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

  3. DylanDylann commented on Nov 3, 2023

    @DylanDylann
    Contributor

    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)

  4. puneetlath commented on Nov 6, 2023

    @puneetlath
    Contributor

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

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 6, 2023
  6. 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[/+] on Nov 6, 2023
  7. melvin-bot commented on Nov 6, 2023

    @melvin-bot
  8. DylanDylann commented on Nov 6, 2023

    @DylanDylann
    Contributor

    @puneetlath Oke I can raise PR now

  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 6, 2023
  10. 19 remaining items

  11. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 6, 2023
  12. melvin-bot commented on Nov 6, 2023

    @melvin-bot

    📣 @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 📖

  13. melvin-bot commented on Nov 6, 2023

    @melvin-bot

    📣 @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 📖

  14. puneetlath commented on Nov 13, 2023

    @puneetlath
    Contributor

    All paid. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions