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-15] [HOLD for payment 2024-04-09] IOU - Split btn for single contact became inactive when returned from final review #39320

Closed
6 tasks done
lanitochka17 opened this issue Mar 30, 2024 · 22 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

@lanitochka17
Copy link

lanitochka17 commented Mar 30, 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
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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6432434_1711785327928.Screen_Recording_2024-03-30_at_09.51.59.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Mar 30, 2024
Copy link

melvin-bot bot commented Mar 30, 2024

Triggered auto assignment to @iwiznia (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ 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.

@nexarvo
Copy link
Contributor

nexarvo commented Apr 1, 2024

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:

App/src/libs/actions/IOU.ts

Lines 398 to 401 in 99cc0b6

function setMoneyRequestParticipants_temporaryForRefactor(transactionID: string, participants: Participant[]) {
Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {participants});
}

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.

const navigateBack = useCallback(() => {
// If there is not a report attached to the IOU with a reportID, then the participants were manually selected and the user needs taken
// back to the participants step
if (!transaction.participantsAutoAssigned) {
Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.getRoute(iouType, transactionID, reportID));
return;
}
IOUUtils.navigateToStartMoneyRequestStep(requestType, iouType, transactionID, reportID);
}, [transaction, iouType, requestType, transactionID, reportID]);
const navigateToAddReceipt = useCallback(() => {
Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_SCAN.getRoute(CONST.IOU.ACTION.CREATE, iouType, transactionID, reportID, Navigation.getActiveRouteWithoutParams()));
}, [iouType, transactionID, reportID]);

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

033e2d49-aa23-4910-a66f-55fa648fac2b.mp4

@melvin-bot melvin-bot bot added the Overdue label Apr 1, 2024
@marcaaron
Copy link
Contributor

Do you know what PR caused the regression @nexarvo?

@iwiznia
Copy link
Contributor

iwiznia commented Apr 1, 2024

Discussing alternatives here

@melvin-bot melvin-bot bot removed the Overdue label Apr 1, 2024
@iwiznia iwiznia assigned iwiznia and nexarvo and unassigned iwiznia Apr 1, 2024
@iwiznia iwiznia added External Added to denote the issue can be worked on by a contributor Bug Something is broken. Auto assigns a BugZero manager. labels Apr 1, 2024
Copy link

melvin-bot bot commented Apr 1, 2024

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

@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 - @alitoshmatov (External)

Copy link

melvin-bot bot commented Apr 1, 2024

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

@Beamanator
Copy link
Contributor

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

@mountiny
Copy link
Contributor

mountiny commented Apr 2, 2024

I cannot repro this anymore

@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Apr 2, 2024
@mountiny mountiny removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 2, 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 Apr 2, 2024
@melvin-bot melvin-bot bot changed the title IOU - Split btn for single contact became inactive when returned from final review [HOLD for payment 2024-04-09] IOU - Split btn for single contact became inactive when returned from final review Apr 2, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 2, 2024
Copy link

melvin-bot bot commented Apr 2, 2024

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

Copy link

melvin-bot bot commented Apr 2, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.58-8 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-09. 🎊

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)

Copy link

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

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Apr 8, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-04-09] IOU - Split btn for single contact became inactive when returned from final review [HOLD for payment 2024-04-15] [HOLD for payment 2024-04-09] IOU - Split btn for single contact became inactive when returned from final review Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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-15. 🎊

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)

Copy link

melvin-bot bot commented Apr 8, 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.
  • [@sakluger] 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 Apr 8, 2024
@sakluger
Copy link
Contributor

sakluger commented Apr 9, 2024

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?

@melvin-bot melvin-bot bot added the Overdue label Apr 12, 2024
@sakluger
Copy link
Contributor

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

@melvin-bot melvin-bot bot removed the Overdue label Apr 12, 2024
@nexarvo
Copy link
Contributor

nexarvo commented Apr 12, 2024

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

@alitoshmatov
Copy link
Contributor

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

@sakluger
Copy link
Contributor

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

Copy link

melvin-bot bot commented Apr 15, 2024

Payment Summary

Upwork Job

BugZero Checklist (@sakluger)

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

@sakluger
Copy link
Contributor

All paid, thanks everyone!

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
None yet
Development

No branches or pull requests

8 participants