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 2024-03-19] [$500] [Held Requests] Hold request modal does not dismiss for Employee after admin pays the request #37014

Closed
6 tasks done
izarutskaya opened this issue Feb 21, 2024 · 38 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 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Feb 21, 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!


Found when validating PR : #33897

Version Number: v1.4.43-6
Reproducible in staging?: Y
Reproducible in production?: N
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:

Precondition:
Admin and employee are in the same workspace.

  1. [Employee] Create a manual request from workspace chat.
  2. [Employee] Submit the request.
  3. [Employee] Go to request details page.
  4. [Employee] Click 3-dot menu > Hold request.
  5. [Admin] Pay the request.
  6. [Employee] After the background shows "paid", add a reason and submit it.

Expected Result:

In Step 5, Hold Request modal should dismiss for Employee after Admin pays it.

Actual Result:

In Step 5, Hold Request modal does not dismiss for Employee after Admin pays it. As a result, employee can hold the paid request.

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

Bug6386751_1708514994509.bandicam_2024-02-21_04-11-41-368.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01dad4e5f90367adf7
  • Upwork Job ID: 1760292458905010176
  • Last Price Increase: 2024-02-28
  • Automatic offers:
    • alitoshmatov | Reviewer | 0
    • WikusKriek | Contributor | 0
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 21, 2024
@melvin-bot melvin-bot bot changed the title Hold Request - Hold request modal does not dismiss for Employee after admin pays the request [$500] Hold Request - Hold request modal does not dismiss for Employee after admin pays the request Feb 21, 2024
Copy link

melvin-bot bot commented Feb 21, 2024

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

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

melvin-bot bot commented Feb 21, 2024

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

Copy link

melvin-bot bot commented Feb 21, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 21, 2024
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.

Copy link

melvin-bot bot commented Feb 21, 2024

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

@izarutskaya
Copy link
Author

We think that this bug might be related to #vip-bills
CC @davidcardoza

@neonbhai
Copy link
Contributor

neonbhai commented Feb 21, 2024

Proposal

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

Hold request modal does not dismiss for Employee after admin pays the request

What is the root cause of that problem?

We don't check if the request is Paid when Hold Request is pressed on HoldReasonPage.tsx

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

We should fail with error or disable the button instead of dismissing without user action like we do in other areas of the App. We should disable the Hold Request button or show error when pressed if the report is Settled and could not be held.

We should check for isSettled using:

const isSettled = ReportUtils.isSettled(reportID);

@dukenv0307
Copy link
Contributor

dukenv0307 commented Feb 21, 2024

Proposal

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

In Step 5, Hold Request modal does not dismiss for Employee after Admin pays it. As a result, employee can hold the paid request.

What is the root cause of that problem?

We don't dismiss the hold request page if the request is paid

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

In HoldReasonPage, we should use the same check as we do when we display the hold request option in header. If the check is false we will dismiss the hold request page since we cannot hold request. This also can help us to prevent openning the hold request page by deeplink if we cannot do this action.

const isRequestModifiable = !isSettled && !isApproved && !ReportActionsUtils.isDeletedAction(parentReportAction);

if (!isOnHold && (isRequestIOU || canModifyStatus)) {

What alternative solutions did you explore? (Optional)

NA

@puneetlath
Copy link
Contributor

I don't think this needs to be a blocker. Going to assign to @robertjchen as CME to decide what the ideal behavior is, since he's leading the "hold" project.

@puneetlath puneetlath added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Feb 21, 2024
@puneetlath puneetlath assigned robertjchen and unassigned puneetlath Feb 21, 2024
@robertjchen
Copy link
Contributor

robertjchen commented Feb 22, 2024

Yep, not a deploy blocker but great catch here- I think the big UX difference between the two above proposals are:

We should disable the Hold Request button or show error when pressed if the report is Settled and could not be held.

and

we will dismiss the hold request page since we cannot hold request. This also can help us to prevent openning the hold request page by deeplink if we cannot do this action.

I'm partial to the latter one (@dukenv0307 's approach), but is there room to combine both approaches? 🤔 What do you think @alitoshmatov ?

cc: @Expensify/design for guidance on what would be the most consistent experience.

@dukenv0307
Copy link
Contributor

we will dismiss the hold request page since we cannot hold request. This also can help us to prevent openning the hold request page by deeplink if we cannot do this action.

My approach is the same way as we do for edit flow

// Dismiss the modal when a current user cannot edit a money request.
Navigation.isNavigationReady().then(() => {
Navigation.dismissModal();

@shawnborton
Copy link
Contributor

Hmm I think I would just block form submission on the hold modal in this case, letting them know that the expense status changed and they can no longer hold it as the form error message. Otherwise it feels a bit strange to automatically close the modal for them if they don't know why that's happening.

Copy link

melvin-bot bot commented Feb 28, 2024

Current assignee @robertjchen is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@robertjchen
Copy link
Contributor

Agreed with @WikusKriek proposal 👍 Let's move forward with the PR, and we can finalize the messaging when reviewing it

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 29, 2024
Copy link

melvin-bot bot commented Feb 29, 2024

📣 @alitoshmatov 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Feb 29, 2024

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

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 29, 2024
@trjExpensify trjExpensify moved this to Release 1: Spring 2024 (May) in [#whatsnext] #wave-collect Mar 5, 2024
@trjExpensify trjExpensify changed the title [$500] Hold Request - Hold request modal does not dismiss for Employee after admin pays the request [$500] [Held Requests] Hold request modal does not dismiss for Employee after admin pays the request Mar 5, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 12, 2024
@melvin-bot melvin-bot bot changed the title [$500] [Held Requests] Hold request modal does not dismiss for Employee after admin pays the request [HOLD for payment 2024-03-19] [$500] [Held Requests] Hold request modal does not dismiss for Employee after admin pays the request Mar 12, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 12, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

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

Copy link

melvin-bot bot commented Mar 12, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.50-5 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 2024-03-19. 🎊

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

Copy link

melvin-bot bot commented Mar 12, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@alitoshmatov] The PR that introduced the bug has been identified. Link to the PR:
  • [@alitoshmatov] 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:
  • [@alitoshmatov] A discussion in #expensify-bugs 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:
  • [@alitoshmatov] Determine if we should create a regression test for this bug.
  • [@alitoshmatov] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 18, 2024
@JmillsExpensify
Copy link

@alitoshmatov Do you mind helping with the BZ checklist? In the meantime, payment summary as follows:

@alitoshmatov
Copy link
Contributor

@alitoshmatov
Copy link
Contributor

@JmillsExpensify Completed the checklist

@JmillsExpensify
Copy link

Many thanks! All contracts have been paid out.

@github-project-automation github-project-automation bot moved this from Release 1: Spring 2024 (May) to Done in [#whatsnext] #wave-collect Mar 24, 2024
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 Engineering External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests