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

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

Closed
1 of 6 tasks
kbecciv opened this issue Aug 31, 2023 · 12 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

@kbecciv
Copy link

kbecciv commented Aug 31, 2023

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
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

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

@AJV009
Copy link

AJV009 commented Aug 31, 2023

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?)

@StevenKKC
Copy link
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.

@stephanieelliott stephanieelliott added the External Added to denote the issue can be worked on by a contributor label Sep 1, 2023
@melvin-bot melvin-bot bot 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 Sep 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@thesahindia
Copy link
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.

@melvin-bot melvin-bot bot removed the Overdue label Sep 4, 2023
@thesahindia
Copy link
Member

@stephanieelliott, I think we should close this issue.

@thesahindia
Copy link
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

@stephanieelliott
Copy link
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
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

5 participants