App icon indicating copy to clipboard operation
App copied to clipboard

IOU - Split btn for single contact became inactive when returned from final review

Open lanitochka17 opened this issue 1 year ago • 2 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.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 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause -Internal Team

Action Performed:

Precondition: user should be Signed In

  1. Open https://staging.new.expensify.com/
  2. Click on FAB > Request money
  3. Select Manual tab
  4. Write any amount and click on Next button
  5. Click on a single contact
  6. Click on back button
  7. Click on the "Split" button for the same contact from step 5

Expected Result:

Selected contact should stick to the top and marked with a green checkmark when user clicked on a "Split" button for a single contact

Actual Result:

Nothing happened when user clicked on "Split" button. The split button for the single contact unresponsive on clicks

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/42317d46-8b16-4de5-a741-d10ff7c2b062

View all open jobs on GitHub

lanitochka17 avatar Mar 30 '24 16:03 lanitochka17

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

melvin-bot[bot] avatar Mar 30 '24 16:03 melvin-bot[bot]

: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 Mar 30 '24 16:03 github-actions[bot]

Proposal

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

Split btn for single contact became inactive when returned from final review

What is the root cause of that problem?

When we select single participant it becomes an iouType = 'request'. But when we go back this participant is already selected in the onyx so when we hit split for the same participant it tries to save same data in onyx here: https://github.com/Expensify/App/blob/99cc0b6f34c477dee40934b0ffb294e5dde1f58a/src/libs/actions/IOU.ts#L398-L401

And hence nothing changes and the tick circle does not re-render. hence we don't see the participant as selected but actually it is selected.

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

When we go back from participant confirmation page we can reset the participant onyx data for type request so that when we select split on the same participant, the data is saved in onyx and hence it will re-render the list item. https://github.com/Expensify/App/blob/99cc0b6f34c477dee40934b0ffb294e5dde1f58a/src/pages/iou/request/step/IOURequestStepConfirmation.js#L166-L178

We need to pass iouType to the participant object so that it differs between request and split iouType. We need to do change in addSingleParticipant like:

{
    ..._.pick(option, 'accountID', 'login', 'isPolicyExpenseChat', 'reportID', 'searchText'),
    selected: true,
+    iouType: iouType
},

and in addParticipantToSelection like:

{
    accountID: option.accountID,
    login: option.login,
    isPolicyExpenseChat: option.isPolicyExpenseChat,
    reportID: option.reportID,
    selected: true,
    searchText: option.searchText,
+    iouType: iouType === CONST.IOU.TYPE.REQUEST ? CONST.IOU.TYPE.SPLIT : iouType
},

What alternative solutions did you explore? (Optional)

Result

https://github.com/Expensify/App/assets/53095363/a159dee7-773f-4e1c-aef4-c66aa73afe95

nexarvo avatar Apr 01 '24 20:04 nexarvo

Do you know what PR caused the regression @nexarvo?

marcaaron avatar Apr 01 '24 20:04 marcaaron

Discussing alternatives here

iwiznia avatar Apr 01 '24 21:04 iwiznia

Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

melvin-bot[bot] avatar Apr 01 '24 22:04 melvin-bot[bot]

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

melvin-bot[bot] avatar Apr 01 '24 22:04 melvin-bot[bot]

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

melvin-bot[bot] avatar Apr 01 '24 22:04 melvin-bot[bot]

Fix was CP'd to staging 3 hours ago, lets see if we can get an applause member to help test this? 🙏

Beamanator avatar Apr 02 '24 07:04 Beamanator

I cannot repro this anymore

mountiny avatar Apr 02 '24 09:04 mountiny

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

melvin-bot[bot] avatar Apr 02 '24 11:04 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.58-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/39383

If no regressions arise, payment will be issued on 2024-04-09. :confetti_ball:

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

  • @nexarvo requires payment (Needs manual offer from BZ)
  • @alitoshmatov requires payment (Needs manual offer from BZ)

melvin-bot[bot] avatar Apr 02 '24 11:04 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:

  • [ ] [@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.
  • [ ] [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

melvin-bot[bot] avatar Apr 02 '24 11:04 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.60-13 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/39383

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

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

  • @nexarvo requires payment (Needs manual offer from BZ)
  • @alitoshmatov requires payment (Needs manual offer from BZ)

melvin-bot[bot] avatar Apr 08 '24 10:04 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:

  • [ ] [@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.
  • [ ] [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

melvin-bot[bot] avatar Apr 08 '24 10:04 melvin-bot[bot]

I'm a little confused and have a few questions regarding this issue:

  1. Was there a regression from this issue, or is this issue fixing a regression?
  2. There's no price mentioned in the issue title - Are we paying out the standard $500?
  3. Shouldn't this be ready for payment today instead of next week since it was deployed to prod on Apr 2?

sakluger avatar Apr 09 '24 22:04 sakluger

Asked those questions in Slack: https://expensify.slack.com/archives/C01GTK53T8Q/p1712951143397419

sakluger avatar Apr 12 '24 19:04 sakluger

@sakluger this issue fixed a deploy blocker and there is no regression reported for this issue. Also, creating Upwork job failed when it was made external. I think this will be a $500 as it was assigned and made external before we made standard as $250.

nexarvo avatar Apr 12 '24 20:04 nexarvo

This was handled without my involvement, so no payment for me

alitoshmatov avatar Apr 13 '24 18:04 alitoshmatov

Thank you @nexarvo! I've sent you an offer via Upwork here: https://www.upwork.com/nx/wm/offer/101873610.

sakluger avatar Apr 15 '24 16:04 sakluger

Payment Summary

Upwork Job

  • Contributor: @nexarvo paid $500 via Upwork (LINK)
  • ~ROLE: @alitoshmatov paid $(AMOUNT) via Upwork (LINK)~

BugZero Checklist (@sakluger)

  • [x] I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • [x] I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • [x] I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • [x] I have verified the payment summary above is correct

melvin-bot[bot] avatar Apr 15 '24 18:04 melvin-bot[bot]

All paid, thanks everyone!

sakluger avatar Apr 15 '24 19:04 sakluger