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

[HOLD for payment 2023-10-25] [$500] IOU - In Header Workspace, members are not shown and IOU delivered to them #27090

Closed
1 of 6 tasks
lanitochka17 opened this issue Sep 9, 2023 · 54 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 9, 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:

Login secondary device

  1. Go to https://staging.new.expensify.com/
  2. Tap profile icon
  3. Tap workspaces
  4. Tap any workspace
  5. Invite a member
  6. Navigate to LHN
  7. Open Workspace chat
  8. Tap request money and create an IOU
  9. Tap header -members to note number of members and details
  10. Open invited member account - primary device
  11. Open Workspace chat

Expected Result:

In header of Workspace chat, all members should be shown. And IOU created must to delivered to its members

Actual Result:

In header of Workspace chat, member are not shown. And IOU created in Workspace chat, not delivered to its members

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.66-3

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Bug6193599_iou.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b02d428c60467905
  • Upwork Job ID: 1704060529674792960
  • Last Price Increase: 2023-10-03
Issue OwnerCurrent Issue Owner: @dylanexpensify
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 9, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 9, 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

@melvin-bot melvin-bot bot added the Overdue label Sep 12, 2023
@dylanexpensify
Copy link
Contributor

reviewing today

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

@dylanexpensify Huh... This is 4 days overdue. Who can take care of this?

@dylanexpensify
Copy link
Contributor

Posted in slack internal to have someone test since you need two android phones!

@melvin-bot melvin-bot bot removed the Overdue label Sep 19, 2023
@dylanexpensify
Copy link
Contributor

@peterdbarkerUK confirmed!

@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label Sep 19, 2023
@melvin-bot melvin-bot bot changed the title IOU - In Header Workspace, members are not shown and IOU delivered to them [$500] IOU - In Header Workspace, members are not shown and IOU delivered to them Sep 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 19, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01b02d428c60467905

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

melvin-bot bot commented Sep 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 19, 2023

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

@zukilover
Copy link
Contributor

zukilover commented Sep 19, 2023

Proposal

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

In Header Workspace, members are not shown and IOU delivered to them

What is the root cause of that problem?

It does not show the complete members because the list of participants is only derived from the report instance itself, and not from the workspace data:

const participants = _.map(getAllParticipants(props.report, props.personalDetails, props.translate), (participant) => ({
...participant,
isDisabled: ReportUtils.isOptimisticPersonalDetail(participant.accountID),
}));

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

If this is a report from a workspace, we should populate the members from the correct policy members, e.g.:

  • connect with the policy members information:
policyMembers: {
            key: (props) => `${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${props.report.policyID}`,
        },
  • populate workspace members:
const getMemberOptions = () => {
        let result = [];
        _.each(props.policyMembers, (_, accountID) => {
            const details = lodashGet(props.personalDetails, accountID, {displayName: props.personalDetails.displayName || props.translate('common.hidden'), avatar: ''});

            result.push({
                keyForList: accountID,
                accountID: Number(accountID),
                text: details.displayName,
                displayName: details.displayName,
                alternateText: details.login,
                icons: [
                    {
                        id: accountID,
                        source: UserUtils.getAvatar(details.avatar, accountID),
                        name: details.login,
                        type: CONST.ICON_TYPE_AVATAR,
                    },
                ],
            });
        });

        result = _.sortBy(uniqBy(result, 'alternateText'), (value) => (value.text || '').toLowerCase());

        return result;
    };
  • and show the appropriate list of participants:
const data = props.report.policyID && !ReportUtils.isAdminRoom(props.report)
        ? getMemberOptions() 
        : getAllParticipants(props.report, props.personalDetails, props.translate);

const participants = _.map(data, (participant) => ({
            ...participant,
            isDisabled: ReportUtils.isOptimisticPersonalDetail(participant.accountID),
        }))

As pointed by @burczu, participants count is also off on report detail page. This is because ReportDetailsPage is populating the participants from participantAccountIDs, regardless it's a workspace or not.

const participants = useMemo(() => ReportUtils.getParticipantsIDs(props.report), [props.report]);

I propose that we use the same approach, i.e. populating participants from policy members if this is a workspace:

Get workspace members if it's not available in the store yet:

const getWorkspaceMembers = useCallback(() => {
        Policy.openWorkspaceMembersPage(props.report.policyID, workspaceMembers);
    }, [props.report.policyID, workspaceMembers]);

    useEffect(() => {
        if (props.report.policyID && !ReportUtils.isAdminRoom(props.report)) {
            getWorkspaceMembers()
        }
    }, [])

Populate workspace members:

const workspaceMembers = useMemo(() => 
        _.keys(PolicyUtils.getMemberAccountIDsForWorkspace(props.policyMembers, props.personalDetails)), 
        [props.policyMembers, props.personalDetails]
    )

Update participants logic:

const participants = useMemo(() => {
        return props.report.policyID && !ReportUtils.isAdminRoom(props.report)
            ?  workspaceMembers
            : lodashGet(props.report, 'participantAccountIDs', [])
    }, [props.report, workspaceMembers]);

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot added the Overdue label Sep 21, 2023
@dylanexpensify
Copy link
Contributor

@burczu mind giving the above proposal a review soon? 🙇‍♂️

@melvin-bot melvin-bot bot removed the Overdue label Sep 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 23, 2023

@burczu @dylanexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Sep 23, 2023
@burczu
Copy link
Contributor

burczu commented Sep 25, 2023

@dylanexpensify Sorry for the delay - I was dealing with an issue building the App for Android, but it's sorted now and I'll review this one today.

@melvin-bot melvin-bot bot removed the Overdue label Sep 25, 2023
@burczu
Copy link
Contributor

burczu commented Sep 25, 2023

For now I can't reproduce this issue due to the problem with workspace invitations described here: https://expensify.slack.com/archives/C049HHMV9SM/p1695627542846449 - I need to wait until it's resolved.

There is also an issue created already: #28130

@melvin-bot
Copy link

melvin-bot bot commented Sep 26, 2023

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

@jasperhuangg
Copy link
Contributor

jasperhuangg commented Oct 17, 2023

@dylanexpensify
I think we can pay everyone out as normal. There was no way they could have known that we didn't need to solve this.

@burczu @zukilover moving forward, let's be sure we have full context on a feature before we decide to fix it. Here, we could have used the response from the back-end to see that workspace rooms weren't being shared with everyone by default on creation anymore.

@francoisl
Copy link
Contributor

Hi everyone, the QA team reported that the issue is still happening on Android and iOS - can someone double-check if there's still something to fix here please?

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 18, 2023
@melvin-bot melvin-bot bot changed the title [$500] IOU - In Header Workspace, members are not shown and IOU delivered to them [HOLD for payment 2023-10-25] [$500] IOU - In Header Workspace, members are not shown and IOU delivered to them Oct 18, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.86-5 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 2023-10-25. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

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:

  • [@burczu] The PR that introduced the bug has been identified. Link to the PR:
  • [@burczu] 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:
  • [@burczu] 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:
  • [@burczu] Determine if we should create a regression test for this bug.
  • [@burczu] 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.
  • [@dylanexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@dylanexpensify
Copy link
Contributor

payment tomorrow!

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 25, 2023
@dylanexpensify
Copy link
Contributor

Payment Summary:

Please apply!

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2023
@dylanexpensify
Copy link
Contributor

Before payment, @zukilover @burczu can you confirm if this is true?

@zukilover
Copy link
Contributor

Hi @dylanexpensify, the PR has been reverted in 351c98a, so the 'Not Fixed' comment should be irrelevant now.

Also, the job in Upwork is no longer available, please advise on how to proceed with the application.

@melvin-bot melvin-bot bot added the Overdue label Nov 1, 2023
@mallenexpensify
Copy link
Contributor

@dylanexpensify can you address @zukilover 's comment above plz, thx

Copy link

melvin-bot bot commented Nov 2, 2023

@zukilover, @deetergp, @burczu, @dylanexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@dylanexpensify
Copy link
Contributor

Sorry team, was OOO sick last week! @zukilover can you confirm then if the PR caused a regression? Seems so given we had to revert?

@melvin-bot melvin-bot bot removed the Overdue label Nov 6, 2023
@zukilover
Copy link
Contributor

zukilover commented Nov 6, 2023

@dylanexpensify The reversal was not due to a regression but a decision to not include the PR at all as it was not actually required. This is a per: #27090 (comment)

@dylanexpensify
Copy link
Contributor

Got it - @zukilover what's your name for Upwork invite

@zukilover
Copy link
Contributor

Here is my Upwork profile.

Thanks @dylanexpensify

@dylanexpensify
Copy link
Contributor

invited!

@dylanexpensify
Copy link
Contributor

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants