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-04-05] [Simplified Collect][Workflows] "Make or track payments" section is no longer grayed out after updating to USD #38926

Closed
6 tasks done
izarutskaya opened this issue Mar 25, 2024 · 25 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Weekly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Mar 25, 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 executing PR : #38318

Version Number: 1.4.56-1
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

Precondition:

  • User is admin of Collect workspace.
  • The default currency for Collect workspace is not USD.
  • Make or track payments in Workflows are disabled.
  1. Go to staging.new.expensify.com.
  2. Go to Profile > Workspaces > Collect workspace.
  3. Go to Workflows.
  4. Go offline.
  5. Toggle on "Make or track payments".
  6. Click Connect bank account > Update to USD.
  7. Close bank account RHP.

Expected Result:

"Make or track payments" section will remain grayed out.

Actual Result:

"Make or track payments" section is no longer grayed out after selecting Update to USD.

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

Bug6425351_1711311791044.20240325_035636.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012180f5608246c8c6
  • Upwork Job ID: 1772232177098358784
  • Last Price Increase: 2024-03-25
  • Automatic offers:
    • dukenv0307 | Reviewer | 0
    • tienifr | Contributor | 0
@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 25, 2024
Copy link

melvin-bot bot commented Mar 25, 2024

Triggered auto assignment to @trjExpensify (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.

Copy link

melvin-bot bot commented Mar 25, 2024

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

@izarutskaya
Copy link
Author

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

We think that this bug might be related to #wave-control.

@izarutskaya
Copy link
Author

Production different behavior

20240325_035944.mp4

@mountiny mountiny assigned mountiny and unassigned Beamanator Mar 25, 2024
@mountiny mountiny added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Mar 25, 2024
@mountiny
Copy link
Contributor

Nto a blocker, related to Simplified collect so happy to take over from Alex

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Mar 25, 2024
Copy link

melvin-bot bot commented Mar 25, 2024

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

@melvin-bot melvin-bot bot changed the title Workflows - "Make or track payments" section is no longer grayed out after updating to USD [$500] Workflows - "Make or track payments" section is no longer grayed out after updating to USD Mar 25, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 25, 2024
Copy link

melvin-bot bot commented Mar 25, 2024

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

@mountiny
Copy link
Contributor

This can be external, its a simple polish item though so making it $250

@mountiny mountiny changed the title [$500] Workflows - "Make or track payments" section is no longer grayed out after updating to USD [$250] Workflows - "Make or track payments" section is no longer grayed out after updating to USD Mar 25, 2024
Copy link

melvin-bot bot commented Mar 25, 2024

Upwork job price has been updated to $250

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Mar 25, 2024

Proposal

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

Workflows - "Make or track payments" section is no longer grayed out after updating to USD

What is the root cause of that problem?

The main problem with issue is that when we update currency we we reset all pending action except generalSettings

App/src/libs/actions/Policy.ts

Lines 1348 to 1350 in 250baa9

pendingFields: {
generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE,
},

But for "Make or track payments" we are using reimbursementChoice pending action to display grayed out in offline mode

pendingAction: policy?.pendingFields?.reimbursementChoice,

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

To fix this issue we can add new param with custom pending action for updateGeneralSettings and add for all places where we use generalSettings

Policy.updateGeneralSettings(policy.id, policy.name, CONST.CURRENCY.USD);

And when we will update GeneralSettings we will use new pendingAction

Or as alternative we can use reimbursementChoice for all cases when we call updateGeneralSettings

What alternative solutions did you explore? (Optional)

NA

@trjExpensify trjExpensify changed the title [$250] Workflows - "Make or track payments" section is no longer grayed out after updating to USD [$250] [Workflows] "Make or track payments" section is no longer grayed out after updating to USD Mar 25, 2024
@Krishna2323
Copy link
Contributor

Will be fixed here.

@luacmartins
Copy link
Contributor

@Krishna2323 I'm not sure how the PR you linked above fixes this issue.

@luacmartins luacmartins changed the title [$250] [Workflows] "Make or track payments" section is no longer grayed out after updating to USD [$250] [Simplified Collect][Workflows] "Make or track payments" section is no longer grayed out after updating to USD Mar 25, 2024
@luacmartins luacmartins self-assigned this Mar 25, 2024
@luacmartins
Copy link
Contributor

I like @tienifr's proposal better since it's simpler (doesn't add any new pending fields) and keeps all existing pending fields. Assigning you to the job!

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

melvin-bot bot commented Mar 25, 2024

📣 @dukenv0307 🎉 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 Mar 25, 2024

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

@Krishna2323
Copy link
Contributor

Krishna2323 commented Mar 25, 2024

@luacmartins, the solution by @tienifr is already implemented in this PR. I think we should hold. @tienifr, can you pls check if I'm wrong here. Thanks

@luacmartins
Copy link
Contributor

Ah I see! Thanks for pointing that out! Gonna add this issue to the list of fixed issues of that PR.

@luacmartins luacmartins added the Reviewing Has a PR in review label Mar 25, 2024
@luacmartins luacmartins changed the title [$250] [Simplified Collect][Workflows] "Make or track payments" section is no longer grayed out after updating to USD [Simplified Collect][Workflows] "Make or track payments" section is no longer grayed out after updating to USD Mar 25, 2024
@luacmartins luacmartins removed the External Added to denote the issue can be worked on by a contributor label Mar 25, 2024
@luacmartins
Copy link
Contributor

Note: we can close this issue once the PR is deployed, since payment will be handled in #37254

Copy link

melvin-bot bot commented Mar 28, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 29, 2024
@melvin-bot melvin-bot bot changed the title [Simplified Collect][Workflows] "Make or track payments" section is no longer grayed out after updating to USD [HOLD for payment 2024-04-05] [Simplified Collect][Workflows] "Make or track payments" section is no longer grayed out after updating to USD Mar 29, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 29, 2024
Copy link

melvin-bot bot commented Mar 29, 2024

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

Copy link

melvin-bot bot commented Mar 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.57-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-04-05. 🎊

Copy link

melvin-bot bot commented Mar 29, 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:

  • [@luacmartins / @mountiny] The PR that introduced the bug has been identified. Link to the PR:
  • [@luacmartins / @mountiny] 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:
  • [@luacmartins / @mountiny] 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:
  • [@luacmartins / @mountiny] Determine if we should create a regression test for this bug.
  • [@luacmartins / @mountiny] 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.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@mountiny
Copy link
Contributor

mountiny commented Mar 29, 2024

payments will be handled here #37254

We can close this one

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. Engineering Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

9 participants