Skip to content

[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

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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): applausetester+omci10@applause.expensifail.com
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

Activity

  1. melvin-bot commented on Mar 30, 2024

    @melvin-bot

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

  2. github-actions commented on Mar 30, 2024

    @github-actions
    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.
  3. nexarvo commented on Apr 1, 2024

    @nexarvo
    Contributor

    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
  4. marcaaron commented on Apr 1, 2024

    @marcaaron
    Contributor

    Do you know what PR caused the regression @nexarvo?

  5. iwiznia commented on Apr 1, 2024

    @iwiznia
    Contributor

    Discussing alternatives here

  6. assigned and unassigned on Apr 1, 2024
  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 1, 2024
  8. 24 remaining items

  9. 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[/+] on Apr 8, 2024
  10. melvin-bot commented on Apr 8, 2024

    @melvin-bot

    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)
  11. melvin-bot commented on Apr 8, 2024

    @melvin-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:
  12. sakluger commented on Apr 9, 2024

    @sakluger
    Contributor

    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?
  13. sakluger commented on Apr 12, 2024

    @sakluger
    Contributor
  14. nexarvo commented on Apr 12, 2024

    @nexarvo
    Contributor

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

  15. alitoshmatov commented on Apr 13, 2024

    @alitoshmatov
    Contributor

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

  16. sakluger commented on Apr 15, 2024

    @sakluger
    Contributor

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

  17. melvin-bot commented on Apr 15, 2024

    @melvin-bot

    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
  18. sakluger commented on Apr 15, 2024

    @sakluger
    Contributor

    All paid, thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions