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-11-18] [$250] QAB - Without entering any amount, tapping submit expense/ pay elsewhere shows diff. behavior #51520

Closed
1 of 8 tasks
lanitochka17 opened this issue Oct 26, 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 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 26, 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: 9. 0.54-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Go to 1:1 with an user
  3. Submit an expense
  4. Navigate to LHN
  5. Tap fab - submit expense via quick action button
  6. Tap submit expense without entering any amount
  7. Note no sound is heard
  8. Go to 1:1 with an user
  9. Tap plus icon - pay elsewhere
  10. Enter an amount and tap next
  11. Tap pay elsewhere
  12. Navigate to LHN
  13. Tap fab - Pay expense via quick action button
  14. Tap play elsewhere without entering any amount
  15. Note an sound is heard

Expected Result:

Via qab, without entering any amount, tapping submit expense/ pay elsewhere must show same behavior

Actual Result:

Via qab, without entering any amount, tapping submit expense, user can't hear any sound but fir pay elsewhere, sound is heard

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6645738_1729873670193.Screenrecorder-2024-10-25-21-45-20-745_compress_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021850782070242079103
  • Upwork Job ID: 1850782070242079103
  • Last Price Increase: 2024-10-28
  • Automatic offers:
    • Krishna2323 | Contributor | 104658616
Issue OwnerCurrent Issue Owner: @muttmuure
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 26, 2024
Copy link

melvin-bot bot commented Oct 26, 2024

Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@lschurr FYI 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

@Krishna2323
Copy link
Contributor

Proposal


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

QAB - Without entering any amount, tapping submit expense/ pay elsewhere shows diff. behavior

What is the root cause of that problem?

  • The play sound functionality is not handled when we pay/submit expenses through QAB.
  • The sound is played when we pay through QAB because the sound is played when clicking on the SettlementButton.
    playSound(SOUNDS.SUCCESS);
    onPress(iouPaymentType);

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


  • We should call playSound(SOUNDS.DONE); when a condition is matched inside if (shouldSkipConfirmation) block.
  • We will avoid calling playSound(SOUNDS.DONE); incase of if (iouType === CONST.IOU.TYPE.PAY || iouType === CONST.IOU.TYPE.SEND) because the sound is already handled inside SettlementButton.
    if (shouldSkipConfirmation) {
    // Only skip confirmation when the split is not configurable, for now Smartscanned splits cannot be configured
    if (iouType === CONST.IOU.TYPE.SPLIT && transaction?.iouRequestType === CONST.IOU.REQUEST_TYPE.SCAN) {
    IOU.splitBill({
    participants,
    currentUserLogin: currentUserPersonalDetails.login ?? '',
    currentUserAccountID: currentUserPersonalDetails.accountID,
    amount: backendAmount,
    comment: '',
    currency,
    merchant: CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT,
    tag: '',
    category: '',
    created: transaction?.created ?? '',
    billable: false,
    iouRequestType: CONST.IOU.REQUEST_TYPE.MANUAL,
    existingSplitChatReportID: report?.reportID,
    });
    return;
    }
    if (iouType === CONST.IOU.TYPE.PAY || iouType === CONST.IOU.TYPE.SEND) {
    if (paymentMethod && paymentMethod === CONST.IOU.PAYMENT_TYPE.EXPENSIFY) {
    IOU.sendMoneyWithWallet(report, backendAmount, currency, '', currentUserPersonalDetails.accountID, participants.at(0) ?? {});
    return;
    }
    IOU.sendMoneyElsewhere(report, backendAmount, currency, '', currentUserPersonalDetails.accountID, participants.at(0) ?? {});
    return;
    }
    if (iouType === CONST.IOU.TYPE.SUBMIT || iouType === CONST.IOU.TYPE.REQUEST) {
    IOU.requestMoney(
    report,
    backendAmount,
    transaction?.attendees,
    currency,
    transaction?.created ?? '',
    CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT,
    currentUserPersonalDetails.login,
    currentUserPersonalDetails.accountID,
    participants.at(0) ?? {},
    '',
    {},
    );
    return;
    }
    if (iouType === CONST.IOU.TYPE.TRACK) {
    IOU.trackExpense(
    report,
    backendAmount,
    currency ?? 'USD',
    transaction?.created ?? '',
    CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT,
    currentUserPersonalDetails.login,
    currentUserPersonalDetails.accountID,
    participants.at(0) ?? {},
    '',
    );
    return;
    }
    }
  • Same should be done in IOURequestStepDistance & IOURequestStepScan for both native and web files.
    if (shouldSkipConfirmation) {
    const receipt: Receipt = file;
    receipt.source = source;
    receipt.state = CONST.IOU.RECEIPT_STATE.SCANREADY;
    if (iouType === CONST.IOU.TYPE.SPLIT) {
    IOU.startSplitBill({
    participants,
    currentUserLogin: currentUserPersonalDetails?.login ?? '',
    currentUserAccountID: currentUserPersonalDetails?.accountID ?? -1,
    comment: '',
    receipt,
    existingSplitChatReportID: reportID ?? -1,
    billable: false,
    category: '',
    tag: '',
    currency: transaction?.currency ?? 'USD',
    taxCode: transactionTaxCode,
    taxAmount: transactionTaxAmount,
    });
    return;
    }
    const participant = participants.at(0);
    if (!participant) {
    return;
    }
    if (locationPermissionGranted) {
    getCurrentPosition(
    (successData) => {
    if (iouType === CONST.IOU.TYPE.TRACK && report) {
    IOU.trackExpense(
    report,
    0,
    transaction?.currency ?? 'USD',
    transaction?.created ?? '',
    '',
    currentUserPersonalDetails.login,
    currentUserPersonalDetails.accountID,
    participant,
    '',
    receipt,
    '',
    '',
    '',
    0,
    false,
    policy,
    {},
    {},
    {
    lat: successData.coords.latitude,
    long: successData.coords.longitude,
    },
    );
    } else {
    IOU.requestMoney(
    report,
    0,
    transaction?.attendees,
    transaction?.currency ?? 'USD',
    transaction?.created ?? '',
    '',
    currentUserPersonalDetails.login,
    currentUserPersonalDetails.accountID,
    participant,
    '',
    receipt,
    '',
    '',
    '',
    0,
    false,
    policy,
    {},
    {},
    {
    lat: successData.coords.latitude,
    long: successData.coords.longitude,
    },
    );
    }
    },
    (errorData) => {
    Log.info('[IOURequestStepScan] getCurrentPosition failed', false, errorData);
    // When there is an error, the money can still be requested, it just won't include the GPS coordinates
    createTransaction(receipt, participant);
    },
    {
    maximumAge: CONST.GPS.MAX_AGE,
    timeout: CONST.GPS.TIMEOUT,
    },
    );
    return;
    }

    if (shouldSkipConfirmation) {
    if (iouType === CONST.IOU.TYPE.SPLIT) {
    IOU.splitBill({
    participants,
    currentUserLogin: currentUserPersonalDetails.login ?? '',
    currentUserAccountID: currentUserPersonalDetails.accountID,
    amount: 0,
    comment: '',
    currency: transaction?.currency ?? 'USD',
    merchant: translate('iou.fieldPending'),
    created: transaction?.created ?? '',
    category: '',
    tag: '',
    billable: false,
    iouRequestType,
    existingSplitChatReportID: report?.reportID,
    });
    return;
    }
    IOU.setMoneyRequestPendingFields(transactionID, {waypoints: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD});
    IOU.setMoneyRequestMerchant(transactionID, translate('iou.fieldPending'), false);
    const participant = participants.at(0);
    if (iouType === CONST.IOU.TYPE.TRACK && participant) {
    IOU.trackExpense(
    report,
    0,
    transaction?.currency ?? 'USD',
    transaction?.created ?? '',
    translate('iou.fieldPending'),
    currentUserPersonalDetails.login,
    currentUserPersonalDetails.accountID,
    participant,
    '',
    {},
    '',
    '',
    '',
    0,
    false,
    policy,
    undefined,
    undefined,
    undefined,
    TransactionUtils.getValidWaypoints(waypoints, true),
    undefined,
    undefined,
    undefined,
    undefined,
    customUnitRateID,
    );
    return;
    }
    IOU.createDistanceRequest(
    report,
    participants,
    '',
    transaction?.created ?? '',
    '',
    '',
    '',
    0,
    0,
    transaction?.currency ?? 'USD',
    translate('iou.fieldPending'),
    !!policy?.defaultBillable,
    TransactionUtils.getValidWaypoints(waypoints, true),
    undefined,
    undefined,
    undefined,
    DistanceRequestUtils.getCustomUnitRateID(report.reportID),
    currentUserPersonalDetails.login ?? '',
    currentUserPersonalDetails.accountID,
    transaction?.splitShares,
    iouType,
    transaction,
    );
    return;
    }

What alternative solutions did you explore? (Optional)

  • We can remove the sounds played inside the component files and start calling them inside the utils functions like IOU.splitBill, IOU.trackExpense, IOU.requestMoney, IOU.startSplitBill, IOU.splitBillAndOpenReport etc.
  • We can do the same when creating tasks and should check other places which are using playSound.

Result

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Oct 28, 2024
@melvin-bot melvin-bot bot changed the title QAB - Without entering any amount, tapping submit expense/ pay elsewhere shows diff. behavior [$250] QAB - Without entering any amount, tapping submit expense/ pay elsewhere shows diff. behavior Oct 28, 2024
Copy link

melvin-bot bot commented Oct 28, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 28, 2024
Copy link

melvin-bot bot commented Oct 28, 2024

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

@hungvu193
Copy link
Contributor

@Krishna2323 's proposal here looks good to me!

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Oct 29, 2024

Triggered auto assignment to @Gonals, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

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

melvin-bot bot commented Oct 30, 2024

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

@hungvu193
Copy link
Contributor

@Krishna2323 Do you have any ETA for the PR? 👀

@Krishna2323
Copy link
Contributor

ETA for the PR?

Most likely today or tomorrow. Thanks for waiting 🙇🏻

@Krishna2323
Copy link
Contributor

@hungvu193 PR ready for review ^

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 11, 2024
@melvin-bot melvin-bot bot changed the title [$250] QAB - Without entering any amount, tapping submit expense/ pay elsewhere shows diff. behavior [HOLD for payment 2024-11-18] [$250] QAB - Without entering any amount, tapping submit expense/ pay elsewhere shows diff. behavior Nov 11, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

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

Copy link

melvin-bot bot commented Nov 11, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.59-3 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-11-18. 🎊

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

Copy link

melvin-bot bot commented Nov 11, 2024

@hungvu193 @lschurr The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 18, 2024
@hungvu193
Copy link
Contributor

  • [Contributor] 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/39413/files#r1846211156

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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 a critical one, no need to create slack convo.

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression test:

  1. Submit a manual track expense using "Track expense" option in FAB > Verify done sound is played
  2. Use QAB in FAB to submit manual track expense again > Verify done sound is played
  3. Submit a scan track expense using "Track expense" option in FAB > Verify done sound is played
  4. Use QAB in FAB to submit scan track expense again > Verify done sound is played
  5. Submit a distance track expense using "Track expense" option in FAB > Verify done sound is played
  6. Use QAB in FAB to submit distance track expense again > Verify done sound is played
  7. Submit a manual expense to a user using "Submit expense" option in FAB > Verify done sound is played
  8. Use QAB in FAB to submit manual expense again > Verify done sound is played
  9. Submit a scan expense to a user using "Submit expense" option in FAB > Verify done sound is played
  10. Use QAB in FAB to submit scan expense again > Verify done sound is played
  11. Submit a distance expense to a user using "Submit expense" option in FAB > Verify done sound is played
  12. Use QAB in FAB to submit distance expense again > Verify done sound is played
  13. Send invoice to a user > Verify done sound is played
  14. Open a user report > use + in the composer and pay using the Pay {userName} option > Verify success sound is played
  15. Use QAB in FAB to pay the user again > verify success sound is played

@twisterdotcom twisterdotcom removed the Bug Something is broken. Auto assigns a BugZero manager. label Nov 18, 2024
@twisterdotcom
Copy link
Contributor

Relabelling as Lauren is OOO now.

@twisterdotcom twisterdotcom added the Bug Something is broken. Auto assigns a BugZero manager. label Nov 18, 2024
Copy link

melvin-bot bot commented Nov 18, 2024

Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@garrettmknight
Copy link
Contributor

@muttmuure can you get me an updated payment summary?

@muttmuure
Copy link
Contributor

@hungvu193 - $250 for C+
@Krishna2323 $250 for C

@melvin-bot melvin-bot bot added the Overdue label Nov 25, 2024
Copy link

melvin-bot bot commented Nov 26, 2024

@hungvu193, @Gonals, @lschurr, @muttmuure, @Krishna2323 Huh... This is 4 days overdue. Who can take care of this?

@garrettmknight
Copy link
Contributor

$250 approved for @hungvu193

@muttmuure
Copy link
Contributor

Everyone is paid

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants