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

[LOW] [Splits] [$500] Split - After clicking on a Split button for a member, WS disappears in the Recent list #38510

Closed
3 of 6 tasks
lanitochka17 opened this issue Mar 18, 2024 · 10 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Mar 18, 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.54-0
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
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:

Prerequisite: User has a WS

  1. Tap FAB
  2. Tap Request money
  3. Tap Manual
  4. Enter any value tap Next
  5. Tap Split button on a Member row

Expected Result:

WS should still exist in the Recent list, after clicking on a Split button for a member

Actual Result:

WS disappear in the Recent list, after clicking on a Split button for a member

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

Bug6418251_1710788778857.mobizen_20240318_220407.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013f16adcd9dc81d4a
  • Upwork Job ID: 1772895473797611520
  • Last Price Increase: 2024-03-27
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 18, 2024
Copy link

melvin-bot bot commented Mar 18, 2024

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

@lanitochka17
Copy link
Author

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

@lanitochka17
Copy link
Author

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

@shahinyan11
Copy link

shahinyan11 commented Mar 18, 2024

Proposal

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

Split - After clicking on a Split button for a member, WS disappears in the Recent list

What is the root cause of that problem?

Here we pass prop includeOwnedWorkspaceChats. When a participant is not selected, iouType is request, but after a participant is selected it becomes split and the iouType === CONST.IOU.TYPE.REQUEST condition becomes false.

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

Always set the includeOwnedWorkspaceChats property to true or update the condition like below

iouType === CONST.IOU.TYPE.REQUEST || iouType === CONST.IOU.TYPE.SPLIT

What alternative solutions did you explore? (Optional)

@allgandalf
Copy link
Contributor

allgandalf commented Mar 18, 2024

Proposal

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

What is the root cause of that problem?

We use getFilteredOptions function to get the list of people and policies.
In here by default, we set includeOwnedWorkspaceChats to false:

function getFilteredOptions(
reports: OnyxCollection<Report>,
personalDetails: OnyxEntry<PersonalDetailsList>,
betas: OnyxEntry<Beta[]> = [],
searchValue = '',
selectedOptions: Array<Partial<ReportUtils.OptionData>> = [],
excludeLogins: string[] = [],
includeOwnedWorkspaceChats = false,

and in participant selector page, We only display both owned policies and people when the IOU type is request:

This fails when we have selected one participant as now, it will become a split request

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

We should update the condition in MoneyTemporaryForRefactorRequestParticipantsSelector such that it will be true when iouType exits, this will cover the case where the request is a scan type:

        const chatOptions = OptionsListUtils.getFilteredOptions(
            reports,
            personalDetails,
            betas,
            searchTerm,
            participants,
            CONST.EXPENSIFY_EMAILS,

            // If we are using this component in the "Request money" flow then we pass the includeOwnedWorkspaceChats argument so that the current user
            // sees the option to request money from their admin on their own Workspace Chat.
-            iouType === CONST.IOU.TYPE.REQUEST,
+            !!iouType,
            // OR we can check if the type is not equal to `send`
+           iouType !== CONST.IOU.TYPE.SEND

What alternative solutions did you explore? (Optional)

N/A

@arielgreen arielgreen changed the title Split - After clicking on a Split button for a member, WS disappears in the Recent list [LOW] [Splits] Split - After clicking on a Split button for a member, WS disappears in the Recent list Mar 22, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 22, 2024
@miljakljajic
Copy link
Contributor

this should be fine to be handled externally @lanitochka17 - adding the label now!

@melvin-bot melvin-bot bot removed the Overdue label Mar 27, 2024
@miljakljajic miljakljajic added the External Added to denote the issue can be worked on by a contributor label Mar 27, 2024
Copy link

melvin-bot bot commented Mar 27, 2024

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

@melvin-bot melvin-bot bot changed the title [LOW] [Splits] Split - After clicking on a Split button for a member, WS disappears in the Recent list [$500] [LOW] [Splits] Split - After clicking on a Split button for a member, WS disappears in the Recent list Mar 27, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 27, 2024
Copy link

melvin-bot bot commented Mar 27, 2024

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

@FitseTLT
Copy link
Contributor

@miljakljajic This expected behaviour we can not split between workspace and users
Screenshot 2024-03-27 at 12 55 14 in the afternoon

@melvin-bot melvin-bot bot added the Overdue label Apr 1, 2024
@arielgreen arielgreen changed the title [$500] [LOW] [Splits] Split - After clicking on a Split button for a member, WS disappears in the Recent list [LOW] [Splits] [$500] Split - After clicking on a Split button for a member, WS disappears in the Recent list Apr 3, 2024
@miljakljajic
Copy link
Contributor

That makes sense thank you, closing!

@melvin-bot melvin-bot bot removed the Overdue label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

6 participants