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-06-20] [$500] [Held requests] No confirmation prompt when approving held request via the report preview #39335

Closed
6 tasks done
lanitochka17 opened this issue Mar 31, 2024 · 84 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.

Comments

@lanitochka17
Copy link

lanitochka17 commented Mar 31, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.58-4
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Issue found when executing PR #33124

Action Performed:

Precondition:

  • Admin and employee are in the Collect workspace
  1. Go to staging.new.expensify.com
  2. [Employee] Request money from the workspace chat
  3. [Employee] Go to transaction thread, select Hold request and hold the request
  4. [Admin] Go to expense report with the employee
  5. [Admin] Click Approve button
  6. Note that it shows the prompt to approve the held request
  7. [Admin] Return to the main workspace chat with employee
  8. [Admin] Click Approve
  9. Note that there is no prompt to approve the held request
  10. Repeat Step 4 to 9 with Pay with Expensify button in both expense report and main chat

Expected Result:

When clicking on the approve button in expense report (Step 4) and main chat (Step 7), there will be a confirmation prompt to approve the held request

Actual Result:

When approving the held request from the main chat, there is no confirmation prompt. The same goes for Pay with Expensify button

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

Add any screenshot/video evidence

Bug6433337_1711892581287.20240331_213437.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01db46b9f151c17d73
  • Upwork Job ID: 1774864170413936640
  • Last Price Increase: 2024-05-28
  • Automatic offers:
    • DylanDylann | Contributor | 102499792
    • nkdengineer | Contributor | 102527527
Issue OwnerCurrent Issue Owner: @slafortune
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Mar 31, 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 Mar 31, 2024

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

@lanitochka17
Copy link
Author

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

@lanitochka17
Copy link
Author

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

@bondydaa
Copy link
Contributor

bondydaa commented Apr 1, 2024

digging into this now

@bondydaa
Copy link
Contributor

bondydaa commented Apr 1, 2024

I think it coming from this PR #33124 but it's not immediately clear to me why, looking further.

@bondydaa
Copy link
Contributor

bondydaa commented Apr 1, 2024

oh i missed the exact case here, it's that clicking approve in the reportPreview doesn't trigger the model. I thought it was that when you click the same approve button twice it didn't re-trigger the confirmation model 🤦 .

@bondydaa
Copy link
Contributor

bondydaa commented Apr 1, 2024

I've asked for confirmation here #31345 (comment)

not sure this actually needs to be a blocker or not, this case might not have been scoped out in the original GH so it could have just been an oversight.

@robertjchen robertjchen added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment labels Apr 1, 2024
@robertjchen
Copy link
Contributor

Not a blocker, but definitely should be addressed!

@robertjchen robertjchen removed the Hourly KSv2 label Apr 1, 2024
@bondydaa bondydaa changed the title Hold request - No confirmation prompt when approving held request in the main chat Hold request - No confirmation prompt when approving held request via the report preview Apr 1, 2024
@bondydaa bondydaa added the Bug Something is broken. Auto assigns a BugZero manager. label Apr 1, 2024
Copy link

melvin-bot bot commented Apr 1, 2024

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

@bondydaa bondydaa added the External Added to denote the issue can be worked on by a contributor label Apr 1, 2024
Copy link

melvin-bot bot commented Apr 1, 2024

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

@melvin-bot melvin-bot bot changed the title Hold request - No confirmation prompt when approving held request via the report preview [$500] Hold request - No confirmation prompt when approving held request via the report preview Apr 1, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 1, 2024
Copy link

melvin-bot bot commented Apr 1, 2024

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

@allgandalf
Copy link
Contributor

allgandalf commented Apr 1, 2024

Proposal

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

No confirmation prompt when approving held request via the report preview

What is the root cause of that problem?

We don’t pass confirmApproval like we have with reportheaders:

const confirmApproval = () => {
setRequestType('approve');
if (ReportUtils.hasHeldExpenses(moneyRequestReport.reportID)) {
setIsHoldMenuVisible(true);
} else {
IOU.approveMoneyRequest(moneyRequestReport, true);
}
};

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

We should pass confirmApproval to settlement button in reportPreview

if (iouPaymentType === CONST.IOU.REPORT_ACTION_TYPE.APPROVE) {
if (confirmApproval) {
confirmApproval();
} else {
IOU.approveMoneyRequest(iouReport ?? {});
}
return;
}

confirmApproval,

What alternative solutions did you explore? (Optional)

N/A

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

melvin-bot bot commented May 28, 2024

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

@trjExpensify
Copy link
Contributor

Done! @DylanDylann can you review the proposal today, please? Thanks!

@DylanDylann
Copy link
Contributor

I will complete my review on May 29th

@DylanDylann
Copy link
Contributor

@GandalfGwaihir @nkdengineer Both guys mentioned the correct root cause.

@GandalfGwaihir Besides passing confirmApproval to SettlementButton component we also need to add ProcessMoneyReportHoldMenu modal to ReportPreview as included in @nkdengineer's proposal

@nkdengineer's proposal looks good to me

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented May 29, 2024

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

@trjExpensify
Copy link
Contributor

Perfect. @bondydaa, you good with the proposal? Can we move on to a PR? Thanks!

Copy link

melvin-bot bot commented May 30, 2024

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

@nkdengineer
Copy link
Contributor

@DylanDylann The PR is here.

@slafortune
Copy link
Contributor

Thanks @strepanier03 - I'll take this back now, vacation is O V E R!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 13, 2024
@melvin-bot melvin-bot bot changed the title [$500] [Held requests] No confirmation prompt when approving held request via the report preview [HOLD for payment 2024-06-20] [$500] [Held requests] No confirmation prompt when approving held request via the report preview Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-4 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-06-20. 🎊

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

Copy link

melvin-bot bot commented Jun 13, 2024

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

  • [@DylanDylann] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [@slafortune] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

@DylanDylann
Copy link
Contributor

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:

[@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: NA
[@DylanDylann] 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: NA
[@DylanDylann] 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: NA
[@DylanDylann] Determine if we should create a regression test for this bug. Yes
[@DylanDylann] 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.

Regression Test Proposal

Precondition: Workspace enabled approval

  1. Go to the WS chat
  2. Create two expenses
  3. Open the transaction thread report of one expense and hold the request
  4. Submit the expense
  5. As an approver, open WS chat and click on approve in the report preview
  6. Verify that confirmation prompt appears

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 19, 2024
@slafortune
Copy link
Contributor

@DylanDylann Paid via Upworks ✅
@nkdengineer Paid via Upworks ✅

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 Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.
Projects
No open projects
Archived in project
Development

No branches or pull requests