Skip to content

[HOLD for payment 2024-11-20] [$250] Expense-"Hidden" appears in Members list when the workspace is created via Pay with Expensify #51524

Closed

Description

@lanitochka17

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: 9.0.54-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5134693
Email or phone of affected tester (no customers): applausetester+kh1610015@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

  • Default individual policy currency for both users must be USD.
  1. Go to staging.new.expensify.com
  2. [User A] Submit an expense in USD to User B
  3. [User B] Go to DM with user A
    4/ [User B] Click Pay with Expensify
  4. [User B] Click Business bank account
  5. [User B] Close the RHP
  6. [User B] Go to workspace settings of the newly created workspace
  7. [User B] Go to Members

Expected Result:

There will be no "Hidden" member

Actual Result:

"Hidden" member appears in Members list when the workspace is created via Pay with Expensify in p2p expense

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6645865_1729878847118.20241026_014655.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021853396876299534935
  • Upwork Job ID: 1853396876299534935
  • Last Price Increase: 2024-11-04
Issue OwnerCurrent Issue Owner: @zanyrenney

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 26, 2024
  2. melvin-bot commented on Oct 26, 2024

    @melvin-bot

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

  3. lanitochka17 commented on Oct 26, 2024

    @lanitochka17
    Author

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

  4. lanitochka17 commented on Oct 26, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #wave-collect - Release 1

  5. bernhardoj commented on Oct 27, 2024

    @bernhardoj
    Contributor

    Proposal

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

    Hidden is shown in the workspace member after moving the expense to a new workspace.

    What is the root cause of that problem?

    When we select Business bank account as the payment method, we will optimistically create a new workspace based on the IOU report data.

    if (iouReport && ReportUtils.isIOUReport(iouReport)) {
    const {policyID, workspaceChatReportID, reportPreviewReportActionID} = Policy.createWorkspaceFromIOUPayment(iouReport) ?? {};

    The problem is, we are trying to create the workspace member from the IOU report ownerEmail.

    const employeeEmail = iouReport.ownerEmail ?? '';

    [sessionEmail]: {
    role: CONST.POLICY.ROLE.ADMIN,
    errors: {},
    },
    [employeeEmail]: {
    role: CONST.POLICY.ROLE.USER,
    errors: {},
    },

    However, ownerEmail doesn't exist anymore in the IOU report, only ownerAccountID, so it defaults to an empty string.

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

    There was previously a plan to get the employee email from the personal detail, but I decided to just default it to an empty string because, at that time, the email wasn't really needed.

    Previously, the policy member is keyed by their accountID.
    image

    So, the solution is to get the employee's email from the personal details data.

    const employeeEmail = allPersonalDetails?.[employeeAccountID]?.login ?? '';
    

    I don't think the personal detail login would be undefined, but we can avoid creating the employee optimistic data if employeeEmail is empty.

  6. zanyrenney commented on Oct 29, 2024

    @zanyrenney
    Contributor

    Wave collect is closed, but adding this to expense.

  7. melvin-bot commented on Nov 1, 2024

    @melvin-bot

    @zanyrenney Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  8. zanyrenney commented on Nov 4, 2024

    @zanyrenney
    Contributor

    Oops, i thought I added the external label here - my bad!

  9. 36 remaining items

  10. hungvu193 commented on Nov 20, 2024

    @hungvu193
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other: We removed ownerEmail from IOU report. However we forgot to update it while selecting Business Bank Account

    Where bug was reported:

    • 2a. Reported on production
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on both staging and production
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: https://github.com/Expensify/App/pull/39489/files#r1849609429

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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 critical bug, we don't need to create a discussion.

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    1. User B requests money to User A in USD
    2. User A press Pay with Expensify and choose Business Bank Account. Note down the new workspace created
    3. Go to the workspace member page of the newly created workspace
    4. Verify there is no Hidden member

    Do we 👍 or 👎 ?

  11. melvin-bot commented on Nov 20, 2024

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@zanyrenney)

    • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1853396876299534935/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  12. bernhardoj commented on Nov 20, 2024

    @bernhardoj
    Contributor

    Requested in ND.

  13. garrettmknight commented on Nov 20, 2024

    @garrettmknight
    Contributor

    @zanyrenney can you confirm the payment summary when you get a chance?

  14. zanyrenney commented on Nov 21, 2024

    @zanyrenney
    Contributor

    sure thing @garrettmknight - sorry about the delay everyone. I was out yesterday.

  15. zanyrenney commented on Nov 21, 2024

    @zanyrenney
    Contributor

    Regression test looks good - getting that added now.

  16. zanyrenney commented on Nov 21, 2024

    @zanyrenney
    Contributor

    Closed job on upwork.

    Payment Summary

    Reviewer: @hungvu193 owed $250 via NewDot - please request via ND
    Reviewer: @bernhardoj owed $250 via NewDot - please request via ND

  17. moved this from Hold for Payment to Done in #expensify-bugson Nov 21, 2024
  18. JmillsExpensify commented on Nov 21, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  19. garrettmknight commented on Nov 26, 2024

    @garrettmknight
    Contributor

    $250 approved for @hungvu193

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 productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions