-
Notifications
You must be signed in to change notification settings - Fork 3k
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-04-10][Workspace Chats] Name of the workspace does not appear as the preview row in the search results for the admin #16463
Comments
Current assignee @trjExpensify is eligible for the Bug assigner, not assigning anyone new. |
Job added to Upwork: https://www.upwork.com/jobs/~018cb101c0281722e5 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor Plus for review of internal employee PR - @0xmiroslav ( |
Hi, Ana from Callstack, I can work on this issue |
ProposalPlease re-state the problem that we are trying to solve in this issue.When searching for chats using Cmd+K, the preview of the Policy expense chats does not show the name of the workspace. The expected behaviour would be to show the name of the workspace for the admin and the last message for the member. What is the root cause of that problem?Currently there is no check to see if the user is the admin of the policy expense chat when building the chat preview for the search sidebar. What changes do you think we should make in order to solve the problem?The logic regarding the preview building for the search is in I suggest changing this part of the code to something like const isOwner = ReportUtils.isPolicyExpenseChatAdmin(report, policies);
allReportOptions.push(createOption(logins, personalDetails, report, reportActions, {
showChatPreviewLine,
forcePolicyNamePreview: isPolicyExpenseChat ? isSearchingSomeonesPolicyExpenseChat || isOwner : forcePolicyNamePreview,
})); The function isPolicyExpenseChatAdmin(report, policies) {
if (!isPolicyExpenseChat(report)) {
return false;
}
const policy = policies[`${ONYXKEYS.COLLECTION.POLICY}${report.policyID}`];
if (!policy) {
return false;
}
return policy ? policy.owner === currentUserEmail : false;
} What alternative solutions did you explore? (Optional)N/A |
I think there is a role property for the policy, there is this method which checks if user is an admin for some policy App/src/libs/actions/Policy.js Lines 143 to 153 in 1de4021
|
Ah, got it, makes sense
Ah, so does the
I also noticed that the same error is happening to the LHN in the sidebar. This same logic could be applied there |
@BeeMargarida Great, lets make a PR! Thank you! |
Current assignee @trjExpensify is eligible for the External assigner, not assigning anyone new. |
This is actually external so making it so |
Current assignee @0xmiroslav is eligible for the External assigner, not assigning anyone new. |
Current assignee @mountiny is eligible for the External assigner, not assigning anyone new. |
oh hai just wanted to pop in here - will this be affected by #16483 which we're working on now? |
Seems like we should be good, but would be great to probably merge yours and then merge main to our PR and confirm all works fine. |
Updated, merged main with the PR |
Thanks, reviewed, just pending testing and review from C+ |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.92-2 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-04-07. 🎊 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.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.93-4 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-04-10. 🎊 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.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
@trjExpensify, @BeeMargarida, @mountiny, @0xmiroslav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@trjExpensify, @BeeMargarida, @mountiny, @0xmiroslav Whoops! This issue is 2 days overdue. Let's get this updated quick! |
👋 Melv, I'm back from OoO today. @0xmiroslav, I've sent you a contract for the C+ review.
@BeeMargarida fixed the regression and was the author of #15895 which introduced it, so no action needed here! 😄 Checked them off. As for these:
We're in the process of adding the overarching workspace chats regression test suite, and this is covered in them, so no specific action is needed to add anything else. Checked them off! |
Settled up! |
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:
prerequisite: you must be using an account that's on the policyExpenseChat beta
+
icon FAB > New workspaceManager members
tab of the workspace settingsInvite
and enter a valid email address to invite a new member to the workspaceExpected Result:
As an admin, the workspace chat in the search results should have the primaryLogin (or fullName) as the first row, and the name of the workspace as the second row. I.e
Actual Result:
The workspace chat in the search results displays an empty preview from the member as the second row on creation. I.e
Workaround:
N/A beta feature
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.2.87-1
Reproducible in staging?:
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): tom+wcrun20@trj.chat
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
(excuse the old mock)
Expensify/Expensify Issue URL:
Issue reported by: @trjExpensify
Slack conversation: https://expensify.slack.com/archives/C02HWMSMZEC/p1679607461290709?thread_ts=1679329747.036069&cid=C02HWMSMZEC
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: