-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[C+ Checklist Needs Completion] [$250] Send invoice - Workspaces in sender list are not arranged in alphabetical order #41340
Comments
Triggered auto assignment to @AndrewGable ( |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
@AndrewGable 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 |
#vip-billpay related. Definitely not a blocker, not even sure if this is a bug, cc @danielrvidal |
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspaces are not sorted alphabetically in send invoice flow What is the root cause of that problem?We do not sort the list of workspace we directly return it: App/src/pages/iou/request/step/IOURequestStepSendFrom.tsx Lines 44 to 56 in 35772b2
What changes do you think we should make in order to solve the problem?We need to sort the workspace while returning it using --- a/src/pages/iou/request/step/IOURequestStepSendFrom.tsx
+++ b/src/pages/iou/request/step/IOURequestStepSendFrom.tsx
@@ -54,7 +54,7 @@ function IOURequestStepSendFrom({route, transaction, allPolicies}: IOURequestSte
},
],
isSelected: selectedWorkspace?.policyID === policy.id,
- }));
+ })).sort((a, b) => a.text.localeCompare(b.text)); // Sort the workspaceOptions array by workspace name
}, [allPolicies, selectedWorkspace]); What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Send invoice - Workspaces in sender list are not arranged in alphabetical order What is the root cause of that problem?We are not sorting the Lines 382 to 386 in 35772b2
What changes do you think we should make in order to solve the problem?We should sort the policies in function getActiveAdminWorkspaces(policies: OnyxCollection<Policy>): Policy[] {
const activePolicies = getActivePolicies(policies);
return activePolicies.filter((policy) => shouldShowPolicy(policy, NetworkStore.isOffline()) && isPolicyAdmin(policy)).sort((a, b) => a.name.localeCompare(b.name));
} What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspaces in sender list are not arranged in alphabetical order. What is the root cause of that problem?We don't have any sorting logic in App/src/pages/iou/request/step/IOURequestStepSendFrom.tsx Lines 42 to 58 in 806a9f2
What changes do you think we should make in order to solve the problem?Selected workspace should be shown at the top and others should be in alphabetical order after that. Updated logic in
What alternative options did you explore?We can also apply this sorting logic in
|
Triggered auto assignment to @greg-schroeder ( |
Job added to Upwork: https://www.upwork.com/jobs/~01cb4574300d46ea26 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale ( |
Solid clean-up, marking this as low as I don't think it's material to actually using it. |
Confirmed the order should be alphabetical btw! |
ProposalPlease re-state the problem that we are trying to solve in this issue.The order of workspace is wrong What is the root cause of that problem?The order of policy in ONYX isn't alphabetical and we don't have logic to sort workspace list before displaying What changes do you think we should make in order to solve the problem?First of all, let's see our codebase
We've used the logic to sort workspaces in quite a few places. To keep everything neat and tidy, and avoid any duplicate code, let's whip up a util function. We can use this function everywhere we need it What alternative solutions did you explore? (Optional)If we want to display the selected policy at the top. We need to move this function to
If we go to this approach, we also update the WorkspaceNewRoomPage for consistency. Then we need to use
|
@akinwale - Let me know what you think |
Bump @AndrewGable can you confirm the contributor assignment here? |
📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @ShridharGoel 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR is still in review |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 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 2024-06-13. 🎊 For reference, here are some details about the assignees on this 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:
|
Processing |
Payment summary: Contributor: @ShridharGoel - $250 - paid via Upwork |
@akinwale can you take care of the checklist so we can close this out? Thanks! |
Not exactly a regression. This is more of a feature which wasn't specifically implemented.
Regression Test Steps
Do we agree 👍 or 👎? |
@greg-schroeder Done! |
Thanks! filing regression test and closing |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.68-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Applause's Workspace -> C
Applause's Workspace 1 -> A
Applause's Workspace 2 -> B
Expected Result:
The workspaces will be arranged in alphabetical order
Actual Result:
The workspaces will be arranged in alphabetical order
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6466686_1714487611680.bandicam_2024-04-30_22-29-55-385.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @greg-schroederThe text was updated successfully, but these errors were encountered: