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 2025-01-02] [$250] Workspace - Members invited in offline are not shown in approval page #53931

Closed
4 of 8 tasks
IuliiaHerets opened this issue Dec 11, 2024 · 17 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 Dec 11, 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.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
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 11, 2024
Copy link

melvin-bot bot commented Dec 11, 2024

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.

@bernhardoj
Copy link
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.

@anmurali anmurali added the External Added to denote the issue can be worked on by a contributor label Dec 11, 2024
@melvin-bot melvin-bot bot 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 Dec 11, 2024
Copy link

melvin-bot bot commented Dec 11, 2024

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

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

melvin-bot bot commented Dec 11, 2024

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

@jjcoffee
Copy link
Contributor

@bernhardoj's proposal LGTM!

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 12, 2024

Triggered auto assignment to @AndrewGable, 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 Dec 12, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 13, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @jjcoffee

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 26, 2024
@melvin-bot melvin-bot bot changed the title [$250] Workspace - Members invited in offline are not shown in approval page [HOLD for payment 2025-01-02] [$250] Workspace - Members invited in offline are not shown in approval page Dec 26, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 26, 2024
Copy link

melvin-bot bot commented Dec 26, 2024

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

Copy link

melvin-bot bot commented Dec 26, 2024

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

Copy link

melvin-bot bot commented Dec 26, 2024

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

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Jan 2, 2025
@melvin-bot melvin-bot bot added the Daily KSv2 label Jan 2, 2025
Copy link

melvin-bot bot commented Jan 2, 2025

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

@jjcoffee
Copy link
Contributor

jjcoffee commented Jan 2, 2025

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 👎

Copy link

melvin-bot bot commented Jan 7, 2025

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

@anmurali
Copy link

anmurali commented Jan 8, 2025

Payment Summary

@melvin-bot melvin-bot bot removed the Overdue label Jan 8, 2025
@anmurali anmurali closed this as completed Jan 8, 2025
@bernhardoj
Copy link
Contributor

Requested in ND.

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

@garrettmknight
Copy link
Contributor

$250 approved for @jjcoffee

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

7 participants