Skip to content

[PAID] [Splits] [$500] Split scan - Split button is not disabled after clicking split for group chat split request #38130

Closed

Description

@kavimuru

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.50-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail: n/a
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: applause internal team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com.
  2. Go to workspace chat.
  3. Create a scan split request.
  4. Click on the split request while it is scanning.
  5. Click Split.
  6. Note that the split button is disabled.
  7. Go to group chat.
  8. Create a scan split request.
  9. Click on the split request while it is scanning.
  10. Click Split.

Expected Result:

The split button will be disabled, similar to the behavior for split scan request in workspace chat.

Actual Result:

The split button is not disabled.

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

Bug6410647_1710218279469.20240312_123337.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ed304e35efbbf01c
  • Upwork Job ID: 1768723311474601984
  • Last Price Increase: 2024-03-15
  • Automatic offers:
    • jayeshmangwani | Reviewer | 0

Activity

  1. added
    Daily
    Bug
    on Mar 12, 2024
  2. melvin-bot commented on Mar 12, 2024

    @melvin-bot

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

  3. kavimuru commented on Mar 12, 2024

    @kavimuru
    Author

    we think this bug might be related to #vip-split
    cc @arielgreen

  4. kavimuru commented on Mar 12, 2024

    @kavimuru
    Author

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

  5. Krishna2323 commented on Mar 12, 2024

    @Krishna2323
    Contributor

    Proposal

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

    Split scan - Split button is not disabled after clicking split for group chat split request

    What is the root cause of that problem?

    The issue is different here, the issue mentioned isn't a issue because we disable the submit button when merchant is required and has an error. But we have inconsistency in request money flow and the SplitBillDetailsPage. When we request money to a policy without merchant we don't disable the submit button but it is disabled in SplitBillDetailsPage.

    We don't check for merchantError in the new component MoneyTemporaryForRefactorRequestConfirmationList.

    const shouldDisableButton = selectedParticipants.length === 0;

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

    We should also check for merchantError.
    const shouldDisableButton = selectedParticipants.length === 0 || merchantError;

    Result

    Alternatively

    Replace MoneyRequestConfirmationList with MoneyTemporaryForRefactorRequestConfirmationList in SplitBillDetailsPage.

  6. shahinyan11 commented on Mar 12, 2024

    @shahinyan11
    Contributor

    Proposal

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

    Split scan - Split button is not disabled after clicking split for group chat split request

    What is the root cause of that problem?

    We disable the button depending on shouldDisplayMerchantError here . As we can see in video the merchant error is displaying for workspace Split but not displaying for group chat Split. It is because the props.isPolicyExpenseChat is true for workspace Split and is false for group chat Split which is sent from here. The reason is that the report data received from the backend has chatType:policyExpenseChat if it is workspace chat report and chatType:"" if it is group chat report

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

    Use the same condition to disable the button that you used to display the error message above the button. Update this condition like below

    const shouldDisableButton = selectedParticipants.length === 0 || !_.isEmpty(formError);
    

    We can also define a new constant const isFormErrorExist = !_.isEmpty(formError); and use that instead of using !_.isEmpty(formError) twice

    What alternative solutions did you explore? (Optional)

  7. dragnoir commented on Mar 12, 2024

    @dragnoir
    Contributor

    Proposal

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

    The split button is not disabled when there's a form error

    What is the root cause of that problem?

    The QA mentioned that split on group chat has an error because the button is not disabled when there's an error on the form.

    I think that's correct, we don't disable buttons when there's an error on the form.

    So the issue is within the workspace chat split request.
    We should not disable the form button when there's something missing.

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

    We need to remove shouldDisplayMerchantError from here

    const shouldDisableButton = selectedParticipants.length === 0 || shouldDisplayMerchantError;

    - const shouldDisableButton = selectedParticipants.length === 0 || shouldDisplayMerchantError;
    + const shouldDisableButton = selectedParticipants.length === 0;

    This way we keep consistency between all pages. and below are some examples of errors on fields and button not disabled.

    image

    image

    image

    What alternative solutions did you explore? (Optional)

    We can show on error message that the Merchant is required.

  8. dragnoir commented on Mar 12, 2024

    @dragnoir
    Contributor

    @shawnborton what do you think? Do we need to disable the form button when there's an error on the form? I noticed that across the app, all our forms show errors and do not disable the button.

  9. shawnborton commented on Mar 12, 2024

    @shawnborton
    Contributor

    Yeah, I believe our default form behavior does not make form submit buttons disabled. cc @Expensify/design @marcaaron

  10. dannymcclain commented on Mar 12, 2024

    @dannymcclain
    Contributor

    Yup! You're right—it's outlined in our Forms contributing guide:

    Form Submission

    Submit Button Disabling

    Submit buttons shall not be disabled or blocked from being pressed in most cases. We will allow the user to submit a form and point them in the right direction if anything needs their attention.

    The only time we won’t allow a user to press the submit button is when we have submitted the form and are waiting for a response (e.g. from the API). In this case we will show a loading indicator and additional taps on the submit button will have no effect. This is handled by the Form component and will also ensure that a form cannot be submitted multiple times.

  11. strepanier03 commented on Mar 13, 2024

    @strepanier03
    Contributor

    Does this mean we don't want to make a change because we don't disable the button in most cases?

    Or should I put this external?

  12. dragnoir commented on Mar 13, 2024

    @dragnoir
    Contributor

    @strepanier03 we need to make a change. The issue is about 2 buttons, one disabled and the other not.
    And we were asking if we should disable all OR not allow disable state. (Which button to change)

    So yes, please make external, a component should be fixed to have consistency between all the UI.

  13. added
    External
    on Mar 15, 2024
  14. 32 remaining items

  15. changed the title [-][Split] [$500] Split scan - Split button is not disabled after clicking split for group chat split request[/-] [+][HOLD for payment 2024-03-29] [Split] [$500] Split scan - Split button is not disabled after clicking split for group chat split request[/+] on Mar 22, 2024
  16. removed
    Reviewing
    on Mar 22, 2024
  17. melvin-bot commented on Mar 22, 2024

    @melvin-bot

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

  18. melvin-bot commented on Mar 22, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.55-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-03-29. 🎊

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

  19. melvin-bot commented on Mar 22, 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:

    • [@jayeshmangwani] The PR that introduced the bug has been identified. Link to the PR:
    • [@jayeshmangwani] 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:
    • [@jayeshmangwani] 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:
    • [@jayeshmangwani] Determine if we should create a regression test for this bug.
    • [@jayeshmangwani] 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.
    • [@strepanier03] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  20. changed the title [-][HOLD for payment 2024-03-29] [Split] [$500] Split scan - Split button is not disabled after clicking split for group chat split request[/-] [+][HOLD for payment 2024-03-29] [Splits] [$500] Split scan - Split button is not disabled after clicking split for group chat split request[/+] on Mar 22, 2024
  21. jayeshmangwani commented on Mar 31, 2024

    @jayeshmangwani
    Contributor

    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:

    Regression Test Steps

    1. Open App & Go to workspace chat.
    2. Create a scan split request.
    3. Click on the split request while it is scanning.
    4. Click Split.
    5. Verify that the split button is not disabled.

    Do you agree 👍 or 👎 ?

  22. jayeshmangwani commented on Apr 4, 2024

    @jayeshmangwani
    Contributor

    @strepanier03 This issue is ready for payout.

  23. strepanier03 commented on Apr 4, 2024

    @strepanier03
    Contributor

    Thanks @jayeshmangwani - I'll update the priority label, I was expecting this to flip to Daily and missed it.

  24. added
    Daily
    and removed
    Weekly
    on Apr 4, 2024
  25. strepanier03 commented on Apr 5, 2024

    @strepanier03
    Contributor

    @dragnoir - I just hired you to a job, I'll keep an eye out to pay it when you accept.

    @jayeshmangwani - Paid and closed via Upwork as well.

    Thank you both!

  26. strepanier03 commented on Apr 5, 2024

    @strepanier03
    Contributor

    Saw you accepted so I paid you out as well @dragnoir.

    Thanks again everyone!

  27. changed the title [-][HOLD for payment 2024-03-29] [Splits] [$500] Split scan - Split button is not disabled after clicking split for group chat split request[/-] [+][PAID] [Splits] [$500] Split scan - Split button is not disabled after clicking split for group chat split request[/+] on Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions