Skip to content

[HOLD for payment 2025-01-02] [$250] Workspace - Members invited in offline are not shown in approval page #53931

Closed

Description

@IuliiaHerets

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.74-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N
Email or phone of affected tester (no customers): N
Issue reported by: Applause Internal Team

Action Performed:

  1. Launch app
  2. Go to workspace settings
  3. Tap more features -- enable workflow
  4. Tap workflow - enable approval flow
  5. Tap add approval workflow and enable it
  6. Go to members page
  7. Go offline
  8. Invite a member
  9. Tap workflow - add approval workflow

Expected Result:

Members invited in offline must be shown in approval page.

Actual Result:

Members invited in offline are not shown in approval page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6690716_1733907244827.Screenrecorder-2024-12-11-14-13-55-341_compress_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021866908681014761163
  • Upwork Job ID: 1866908681014761163
  • Last Price Increase: 2024-12-11
Issue OwnerCurrent Issue Owner: @anmurali

Activity

  1. added
    Daily
    Bug
    on Dec 11, 2024
  2. melvin-bot commented on Dec 11, 2024

    @melvin-bot

    Triggered auto assignment to @anmurali (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. bernhardoj commented on Dec 11, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The invited member while offline doesn't show in workflow approval list.

    What is the root cause of that problem?

    We get the list from the policy employeeList, but we return early if the member doesn't have either email or submitsTo property.

    Object.values(employees).forEach((employee) => {
    const {email, submitsTo, pendingAction} = employee;
    if (!email || !submitsTo) {
    return;
    }

    This is because we don't add those optimistically.

    optimisticMembersState[email] = {pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, role: CONST.POLICY.ROLE.USER};

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

    We can add both email and submitsTo optimistically. The submitsTo of a new user will default to the default approver.

    optimisticMembersState[email] = {email, pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, role: CONST.POLICY.ROLE.USER, submitsTo: PolicyUtils.getDefaultApprover(allPolicies?.[policyKey])};
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    We can create a test for addMembersToWorkspace to make sure the optimistic data is correctly added when adding a new member.

  4. added
    External
    on Dec 11, 2024
  5. changed the title [-]Workspace - Members invited in offline are not shown in approval page[/-] [+][$250] Workspace - Members invited in offline are not shown in approval page[/+] on Dec 11, 2024
  6. melvin-bot commented on Dec 11, 2024

    @melvin-bot
  7. added
    Help Wanted
    on Dec 11, 2024
  8. melvin-bot commented on Dec 11, 2024

    @melvin-bot

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

  9. jjcoffee commented on Dec 12, 2024

    @jjcoffee
    Contributor

    @bernhardoj's proposal LGTM!

    🎀👀🎀 C+ reviewed

  10. melvin-bot commented on Dec 12, 2024

    @melvin-bot

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

  11. 10 remaining items

  12. melvin-bot commented on Dec 26, 2024

    @melvin-bot

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

  13. melvin-bot commented on Dec 26, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.78-6 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 2025-01-02. 🎊

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

    • @jjcoffee requires payment through NewDot Manual Requests
    • @bernhardoj requires payment through NewDot Manual Requests
  14. melvin-bot commented on Dec 26, 2024

    @melvin-bot

    @jjcoffee @anmurali @jjcoffee The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  15. added
    Daily
    and removed
    Weekly
    on Jan 2, 2025
  16. melvin-bot commented on Jan 2, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@anmurali)

    • 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/1866908681014761163/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  17. jjcoffee commented on Jan 2, 2025

    @jjcoffee
    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:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 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/46189/files#r1900915398

    • [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: N/A

    • [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.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Test:

    1. Go offline
    2. Open the workspace setting
    3. Add a new member
    4. Open Workflows page
    5. Press Add approval workflow
    6. Verify the member added in step 3 is shown on the list
    7. Proceed to the next step
    8. Verify the member added in step 3 is shown on the list

    Do we agree 👍 or 👎

  18. melvin-bot commented on Jan 7, 2025

    @melvin-bot

    @AndrewGable, @anmurali, @jjcoffee, @bernhardoj Eep! 4 days overdue now. Issues have feelings too...

  19. anmurali commented on Jan 8, 2025

    @anmurali

    Payment Summary

  20. bernhardoj commented on Jan 8, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  21. JmillsExpensify commented on Jan 8, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  22. garrettmknight commented on Jan 9, 2025

    @garrettmknight
    Contributor

    $250 approved for @jjcoffee

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions