Skip to content

[ON HOLD] [$500] Split - Error above split button disappears when merchant is not entered #35667

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.3.45-5
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4264387
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

1, Go to workspace chat
2. Click + > Split bill
3. Create a bill split with an invalid receipt
4. When the scanning fails, click on the split preview
5. Click Amount
6. Enter amount and save

Expected Result:

The error above split button will remain as not all the required fields (Merchant) are entered

Actual Result:

The error above split button disappears when merchant is not entered

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

Bug6364785_1706877386715.20240202_124142.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e2368e0550fbbb4b
  • Upwork Job ID: 1753420140902309888
  • Last Price Increase: 2024-02-23

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 2, 2024
  2. melvin-bot commented on Feb 2, 2024

    @melvin-bot
  3. changed the title [-]Split - Error above split button disappears when merchant is not entered[/-] [+][$500] Split - Error above split button disappears when merchant is not entered[/+] on Feb 2, 2024
  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 2, 2024
  5. melvin-bot commented on Feb 2, 2024

    @melvin-bot

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

  6. melvin-bot commented on Feb 2, 2024

    @melvin-bot

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

  7. lanitochka17 commented on Feb 2, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #vip-split-p2p-chat-groups

  8. bernhardoj commented on Feb 2, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The required fields error disappears after we update the amount of a failed split bill.

    What is the root cause of that problem?

    One of the condition for the error to show is the transaction missing required fields data.

    return (props.hasSmartScanFailed && TransactionUtils.hasMissingSmartscanFields(transaction)) || (didConfirmSplit && TransactionUtils.areRequiredFieldsEmpty(transaction));

    const parentReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${transaction?.reportID}`] ?? null;
    const isFromExpenseReport = parentReport?.type === CONST.REPORT.TYPE.EXPENSE;
    return (isFromExpenseReport && isMerchantMissing(transaction)) || isAmountMissing(transaction) || isCreatedMissing(transaction);

    The merchant is only required if it's an expense request and it should be true for our case. It checks the report from the transaction reportID, but in the split case, the report ID is a constant of -2.

    App/src/libs/actions/IOU.js

    Lines 1418 to 1421 in 8f58898

    const splitTransaction = TransactionUtils.buildOptimisticTransaction(
    amount,
    currency,
    CONST.REPORT.SPLIT_REPORTID,

    This is because a split request doesn't have an IOU report (I guess).

    So, the expense request check is always false, and updating the amount is enough to remove the required fields error message.

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

    Instead of relying on the transaction report ID, we can pass the value from the params.

    areRequiredFieldsEmpty(transaction, isFromExpenseReport)
    

    return (props.hasSmartScanFailed && TransactionUtils.hasMissingSmartscanFields(transaction)) || (didConfirmSplit && TransactionUtils.areRequiredFieldsEmpty(transaction));

    and we can pass props.isPolicyExpenseChat as the value.

    or we can keep the parent report type check and the new param, so we will rely on 2 values
    else, we can pass anything optional like report ID that can be used to detect whether it's an expense report or not

    What alternative solutions did you explore? (Optional)

    We can set the report ID to the split transaction, but I guess we need to do it on BE too which might not be the best solution.

  9. alexpensify commented on Feb 2, 2024

    @alexpensify
    Contributor

    @abdulrahuman5196 when you get a chance, let us know if this proposal will fix this issue. Thanks!

  10. abdulrahuman5196 commented on Feb 5, 2024

    @abdulrahuman5196
    Contributor

    Will work on review today

  11. 9 remaining items

  12. alexpensify commented on Feb 12, 2024

    @alexpensify
    Contributor

    @abdulrahuman5196 - should we start a discussion in the Slack room to confirm the process for this one?

  13. mvtglobally commented on Feb 13, 2024

    @mvtglobally

    Issue not reproducible during KI retests. (First week)

  14. abdulrahuman5196 commented on Feb 14, 2024

    @abdulrahuman5196
    Contributor

    @alexpensify yes. We should check internally

  15. alexpensify commented on Feb 14, 2024

    @alexpensify
    Contributor

    Will do! I'll start one soon.

  16. alexpensify commented on Feb 15, 2024

    @alexpensify
    Contributor

    @abdulrahuman5196 - Since this one didn't appear in recent retests and you noticed a difference in behaviors. I'm going to put this one on hold and we can confirm next week if we should close.

  17. changed the title [-][$500] Split - Error above split button disappears when merchant is not entered[/-] [+][ON HOLD] [$500] Split - Error above split button disappears when merchant is not entered[/+] on Feb 15, 2024
  18. melvin-bot commented on Feb 16, 2024

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  19. alexpensify commented on Feb 23, 2024

    @alexpensify
    Contributor

    Still on hold

  20. melvin-bot commented on Feb 23, 2024

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  21. alexpensify commented on Feb 28, 2024

    @alexpensify
    Contributor

    I'm going to close since this issue appears to have stopped.

  22. melvin-bot commented on Mar 5, 2024

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  23. alexpensify commented on Mar 5, 2024

    @alexpensify
    Contributor

    I checked and this notice is related to #34916 (comment) -- not this GH. No action is required here.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions