Skip to content

[$500] Web - Money request - Workspace member is missing from the workspace when requesting money for workspace #26428

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the website
  2. Settings > workspace
  3. Select a workspace from the list if there is a workspace or create a new one
  4. click member
  5. click invite
  6. Add members to invite
  7. click next
  8. Click invite
  9. Click the + icon from LHN
  10. click request money
  11. Enter the amount
  12. select the workspace from the list
  13. Click the header from the IOU report
  14. Observe the number of member

Expected Result:

The total number of the members should be correct

Actual Result:

The total number of the members is not correct

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.60.3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Screenshare.-.2023-08-26.8_47_27.AM.mp4
Recording.4136.mp4

Expensify/Expensify Issue URL:
Issue reported by: @misgana96
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693028736979619

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0152b582c375b0403c
  • Upwork Job ID: 1697720757871263744
  • Last Price Increase: 2023-09-01

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 31, 2023
  2. melvin-bot commented on Aug 31, 2023

    @melvin-bot

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

  3. melvin-bot commented on Aug 31, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. AJV009 commented on Aug 31, 2023

    @AJV009

    This looks like quite a major bug!
    I was checking it and found that not even the request for the money went through to the other end. (That's the whole point of the app right?)

  5. StevenKKC commented on Sep 1, 2023

    @StevenKKC
    Contributor

    Proposal

    Please state again the problem we are trying to solve in this issue.

    Workspace member is missing from the workspace when requesting money for workspace.

    What is the cause of this issue?

    If click header from IOU report, ReportDetailsPage is displayed, and in ReportDetailsPage, we display report's participantAccountIDs.

    const participants = useMemo(() => lodashGet(props.report, 'participantAccountIDs', []), [props.report]);

    if (participants.length) {
    items.push({
    key: CONST.REPORT_DETAILS_MENU_ITEM.MEMBERS,
    translationKey: 'common.members',
    icon: Expensicons.Users,
    subtitle: participants.length,
    isAnonymousAction: false,
    action: () => {
    Navigation.navigate(ROUTES.getReportParticipantsRoute(props.report.reportID));
    },
    });
    }

    But workspace expense chat report has only one participant id, so total number of the members is 1, and is different with total numbers of the workspace.

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

    We can display total number of workspace members if report is workspace room.

    • Add withPolicy HOC to ReportDetailsPage and ReportParticipantsPage.
    • In ReportDetailsPage, if report is workspace room, we should display total number of workspace members.
    const isPolicyRoom = useMemo(() => ReportUtils.isAdminRoom(props.report) || ReportUtils.isAnnounceRoom(props.report) || ReportUtils.isPolicyExpenseChat(props.report), [props.report]);
    
    const policyMembers = useMemo(() => _.keys(props.policyMembers[`${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${props.report.policyID}`]), [props.policyMembers, props.report.policyID]);

    And change this line as below.

        subtitle: isPolicyRoom ? policyMembers.length : participants.length,
    • In ReportParticipantsPage, we should display workspace members.
      We add policyMembers parameter to getAllParticipants, and pass props.policyMembers.
      And in getAllParticipants, we check if the report is workspace room, and then add workspace members.
    const getAllParticipants = (report, personalDetails, translate, policyMembers = {}) => {
    	...
    
        if (ReportUtils.isAdminRoom(report) || ReportUtils.isAnnounceRoom(report) || ReportUtils.isPolicyExpenseChat(report)) {
            participantAccountIDs = _.keys(policyMembers[`${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${report.policyID}`]);
        }
    
    ...
    
    const participants = _.map(getAllParticipants(props.report, props.personalDetails, props.translate, props.policyMembers), (participant) => ({
    	...

    What alternative solutions have you investigated? (Optional)

    None.

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 1, 2023
  7. changed the title [-]Web - Money request - Workspace member is missing from the workspace when requesting money for workspace[/-] [+][$500] Web - Money request - Workspace member is missing from the workspace when requesting money for workspace[/+] on Sep 1, 2023
  8. melvin-bot commented on Sep 1, 2023

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 1, 2023
  10. melvin-bot commented on Sep 1, 2023

    @melvin-bot

    Current assignee @stephanieelliott is eligible for the External assigner, not assigning anyone new.

  11. melvin-bot commented on Sep 1, 2023

    @melvin-bot

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

  12. melvin-bot commented on Sep 4, 2023

    @melvin-bot

    @stephanieelliott, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  13. thesahindia commented on Sep 4, 2023

    @thesahindia
    Member

    I believe this is expected, you only see 1 member because there's only one member in that specific chat. Inviting other members in workspace will just create new reports related to that workspace.

  14. thesahindia commented on Sep 4, 2023

    @thesahindia
    Member

    @stephanieelliott, I think we should close this issue.

  15. thesahindia commented on Sep 4, 2023

    @thesahindia
    Member

    I feel the bug here is that in selection page we display the workspace chat related to a specific user but at the confirmation page we just display the workspace report and it seems confusing because it looks like we are requesting the money from all the users from that workspace.

    Screenshot 2023-09-04 at 11 23 35 PM Screenshot 2023-09-04 at 11 23 45 PM
  16. stephanieelliott commented on Sep 8, 2023

    @stephanieelliott
    Contributor

    Ah yeah, I agree with you @thesahindia. Thinking about it that way this behavior would be expected.

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions