App icon indicating copy to clipboard operation
App copied to clipboard

IOU - Payment option reverts back to 'Pay with Expensify'

Open lanitochka17 opened this issue 1 year ago • 6 comments

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.38-1 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): [email protected] Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:

Action Performed:

  1. Create an IOU in workspace chat
  2. Change payment option to 'Pay elsewhere'
  3. Click on the IOU preview component

Expected Result:

Payment option on the header should be 'Pay elsewhere'

Actual Result:

Payment option on the header and IOU preview component of the main report reverts back to 'Pay with Expensify'

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [ ] Android: Native
  • [x] Android: mWeb Chrome
  • [ ] iOS: Native
  • [ ] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [x] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/408ebf3b-1eb3-4c22-8c04-559dfec1e563

View all open jobs on GitHub

lanitochka17 avatar Feb 07 '24 19:02 lanitochka17

:wave: 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.

github-actions[bot] avatar Feb 07 '24 19:02 github-actions[bot]

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

melvin-bot[bot] avatar Feb 07 '24 19:02 melvin-bot[bot]

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

lanitochka17 avatar Feb 07 '24 19:02 lanitochka17

most probably related to https://github.com/Expensify/App/pull/33866

ishpaul777 avatar Feb 07 '24 19:02 ishpaul777

Proposal

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

IOU - Payment option reverts back to 'Pay with Expensify'

What is the root cause of that problem?

Issue caused by different sorting logic here: https://github.com/Expensify/App/blob/6135313b8e1210d04cd50d60a519934bca808075/src/components/SettlementButton.tsx#L183-L186 Originally, _.sortBy was used. returning 0 differs logic between _.sortBy (before TS migration) and native array .sort (after TS migration)

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

fix return value so if we wanna put front, return -1 like this: buttonOptions.sort((method) => (method.value === paymentMethod ? -1 : 0));

mkhutornyi avatar Feb 07 '24 20:02 mkhutornyi

cc @ZhenjaHorbach ^

hoangzinh avatar Feb 08 '24 00:02 hoangzinh

cc @ZhenjaHorbach ^

Oh, sorry

I'll get to work on PR now

ZhenjaHorbach avatar Feb 08 '24 07:02 ZhenjaHorbach

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

melvin-bot[bot] avatar Feb 08 '24 11:02 melvin-bot[bot]

Current assignee @ishpaul777 is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Feb 08 '24 11:02 melvin-bot[bot]

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

melvin-bot[bot] avatar Feb 08 '24 11:02 melvin-bot[bot]

Fix is in review

Julesssss avatar Feb 08 '24 11:02 Julesssss

I did not mean to remove that blocker label earlier.

Julesssss avatar Feb 08 '24 12:02 Julesssss

:wave: 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.

github-actions[bot] avatar Feb 08 '24 12:02 github-actions[bot]

PR merged, awaiting CP to staging before I check this off the checklist.

Julesssss avatar Feb 08 '24 12:02 Julesssss

@Julesssss can I get compensation as my solution was exactly used? This was tricky one and I took some efforts debugging and finding the root cause. There were no RCA/solutions provided for 2 hrs after issue created, unlike other issues.

mkhutornyi avatar Feb 08 '24 12:02 mkhutornyi

Yes. @ZhenjaHorbach is fixing a regression from their own issue. So I believe payment only applies to:

  • @mkhutornyi for providing the proposal we ended up using
  • @ishpaul777 for C+ review

Julesssss avatar Feb 08 '24 13:02 Julesssss

Handled. CP'd, build is in progress

Julesssss avatar Feb 08 '24 13:02 Julesssss

Awaiting payment

Julesssss avatar Feb 08 '24 14:02 Julesssss

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

melvin-bot[bot] avatar Feb 08 '24 18:02 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.38-6 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/36115

If no regressions arise, payment will be issued on 2024-02-15. :confetti_ball:

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

  • @ishpaul777 requires payment (Needs manual offer from BZ)

melvin-bot[bot] avatar Feb 08 '24 18:02 melvin-bot[bot]

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:

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

melvin-bot[bot] avatar Feb 08 '24 18:02 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.39-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/36115

If no regressions arise, payment will be issued on 2024-02-19. :confetti_ball:

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

  • @ishpaul777 requires payment (Needs manual offer from BZ)

melvin-bot[bot] avatar Feb 12 '24 13:02 melvin-bot[bot]

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:

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

melvin-bot[bot] avatar Feb 12 '24 13:02 melvin-bot[bot]

Reminder set

Please apply to this job: https://www.upwork.com/jobs/~0153ee13375ff6a485. @mkhutornyi + @ishpaul777

MitchExpensify avatar Feb 13 '24 22:02 MitchExpensify

Payment Summary

Upwork Job

  • ROLE: @ishpaul777 paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@MitchExpensify)

  • [ ] 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/1755559026447237120/hired)
  • [ ] I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • [ ] I have verified the payment summary above is correct

melvin-bot[bot] avatar Feb 19 '24 15:02 melvin-bot[bot]

  • [x] [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:

#33866

  • [x] [@ishpaul777] 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/33866/files#r1494729357

  • [x] [@ishpaul777] 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:

Not required.

  • [x] [@ishpaul777] Determine if we should create a regression test for this bug.

I dont have strong feeling whether we need one or no, this was just a syntax difference between lodash sortBy and Array.sort

  • [x] [@ishpaul777] 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. Steps in issue Description looks good if we decide to create a regression test.

Action Performed:

  1. Create an IOU in workspace chat
  2. Change payment option to 'Pay elsewhere'
  3. Click on the IOU preview component

Expected Result:

Payment option on the header should be 'Pay elsewhere'

ishpaul777 avatar Feb 19 '24 15:02 ishpaul777

@Julesssss, @MitchExpensify, @ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Feb 23 '24 15:02 melvin-bot[bot]

Invites sent https://www.upwork.com/jobs/~0153ee13375ff6a485. @mkhutornyi + @ishpaul777

MitchExpensify avatar Feb 23 '24 21:02 MitchExpensify

Thanks @MitchExpensify, I have accepted the offer!

ishpaul777 avatar Feb 23 '24 21:02 ishpaul777

Paid and contracts ended - Thanks every one!

MitchExpensify avatar Feb 26 '24 01:02 MitchExpensify