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

Expense- "you" is missing in next step message when submitting report in new workspace offline #39337

Closed
6 tasks done
izarutskaya opened this issue Mar 31, 2024 · 19 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Reviewing Has a PR in review

Comments

@izarutskaya
Copy link

izarutskaya commented Mar 31, 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: 1.4.58-4
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a new workspace on ND (Collect).
  3. Go offline.
  4. Request money from the workspace chat.
  5. Click on expense preview.
  6. Click Submit.

Expected Result:

Next step message will show "Waiting for you to approve these expenses.".

Actual Result:

Next step message shows "Waiting for to approve these expenses.". "You" is missing.

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

Bug6433411_1711902195154.20240401_001652.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @bfitzexpensify
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 31, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Mar 31, 2024
Copy link

melvin-bot bot commented Mar 31, 2024

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Mar 31, 2024
Copy link

melvin-bot bot commented Mar 31, 2024

Triggered auto assignment to @AndrewGable (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@melvin-bot melvin-bot bot removed the Hourly KSv2 label Mar 31, 2024
@izarutskaya
Copy link
Author

@bfitzexpensify 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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@izarutskaya
Copy link
Author

izarutskaya commented Mar 31, 2024

Production

image

@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Mar 31, 2024
@mountiny mountiny assigned mountiny and unassigned AndrewGable Mar 31, 2024
@mountiny
Copy link
Contributor

I dont think this is a blocker, its caused by us switching to Collect instead of Free policies.

I will look into this as next steps were part of a project I have worked on

@allgandalf
Copy link
Contributor

Proposal

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

managerDisplayName is missing when we submit report in new workspace offline

What is the root cause of that problem?

In submit step we show managerDisplayName by the following:
https://github.com/Expensify/App/blob/0bb4144593a0ff014bcb39d5c69740470cf459bf/src/libs/NextStepUtils.ts#L81

When created offline, we still don't have the details whether the report is self-approve and hence it calls the getDisplayNameForParticipant util function, but as we are offline it doesn't return anything and we assign a empty string.

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

The solution should be universal and hence if we don't get any value from getDisplayNameForParticipant then instead of a empty string we should assign the text there as approver:

const managerDisplayName = isSelfApproval ? 'you' : ReportUtils.getDisplayNameForParticipant(submitsTo) ?? 'approver';

The reason we shouldn't assign you is that when we approve these expenses we have a optimistic check for managerDisplayName which is not the owner and we will have regression there:

https://github.com/Expensify/App/blob/0bb4144593a0ff014bcb39d5c69740470cf459bf/src/libs/NextStepUtils.ts#L278-L284

Note: We also need to define a new variable for the approved next step as there we want to show waiting for the admin to pay...., changes would be made accordingly

What alternative solutions did you explore? (Optional)

N/A

@mountiny
Copy link
Contributor

mountiny commented Apr 2, 2024

I need to look into what is the expected default value for this

@mountiny
Copy link
Contributor

mountiny commented Apr 3, 2024

The problem is that the default approval mode is set incorrectly

@allgandalf
Copy link
Contributor

The problem is that the default approval mode is set incorrectly

sorry, didn't quite get that

@mountiny
Copy link
Contributor

mountiny commented Apr 3, 2024

ah was noting for myself, there is bunch of other stuff worng here, I will create a PR for this

@allgandalf
Copy link
Contributor

cool 👀

@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Daily KSv2 labels Apr 3, 2024
@mountiny
Copy link
Contributor

mountiny commented Apr 3, 2024

PR is up in a review

@bfitzexpensify bfitzexpensify added Daily KSv2 and removed Weekly KSv2 labels Apr 23, 2024
@bfitzexpensify
Copy link
Contributor

PR hit prod 2 weeks ago.

@rushatgabhane - sent an offer for the PR review via Upwork.

@rushatgabhane
Copy link
Member

rushatgabhane commented Apr 28, 2024

@bfitzexpensify i'll make a manual request on new dot. Could you please attach a payment summary?

@rushatgabhane
Copy link
Member

created a manual request here - https://staging.new.expensify.com/r/445620376024128

@bfitzexpensify
Copy link
Contributor

Great.

Payment summary:

@rushatgabhane to be paid $250 for PR review.

@JmillsExpensify
Copy link

$250 approved for @rushatgabhane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Reviewing Has a PR in review
Projects
No open projects
Archived in project
Development

No branches or pull requests

7 participants