-
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
[HOLD for payment 2023-08-10] [$1000] Web - Workspace name is empty in request money page #23348
Comments
Triggered auto assignment to @kadiealexander ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace name is empty on money request confirmation page What is the root cause of that problem?The confirmation list item is OptionRow and the title (that should show the workspace name) is retrieved from App/src/libs/OptionsListUtils.js Lines 118 to 125 in be2c81f
We can see that we return text with the value from expenseReport.displayName and it's been like this for a f few months. The problem is, the displayName property does not exist on a report. This might raise a question, if it doesn't exist, why do we just see the issue now? Why it works just fine before?Short: The answer is, this issue started to happen after this PR #21406. Long: Before the above PR, we can access displayName from a report object. The displayName is available because we are mutating the Onyx report object here:Lines 122 to 131 in be2c81f
We are still mutating it now, the difference is, the report object we are mutating is the cloned report . If you notice the code above, we are mutating the reportsToDisplay that is the filtered allReportsDict .Lines 105 to 112 in be2c81f
allReportsDict is passed from SidebarLinksData , which is the chatReports as you can see below.App/src/pages/home/sidebar/SidebarLinksData.js Lines 71 to 72 in be2c81f
chatReports comes from the Onyx with a selector.App/src/pages/home/sidebar/SidebarLinksData.js Lines 177 to 180 in be2c81f
The selector is the one that clones the object. App/src/pages/home/sidebar/SidebarLinksData.js Lines 112 to 145 in be2c81f
Previously, reportsToDisplay comes directly from the report object, that is allReports .Lines 28 to 33 in be2c81f
That's why before the PR, mutating the report object will have an effect on every part of the app that uses the object.So, the current code mutates the cloned object, while the previous code mutates the real object. NOTE: even though the issue happens after #21406, I wouldn't say it's a regression, but rather we are discovering a hidden bug. What changes do you think we should make in order to solve the problem?Never use the |
@kadiealexander Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Job added to Upwork: https://www.upwork.com/jobs/~011f529c8226628bb0 |
Current assignee @kadiealexander is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
@bernhardoj Thanks for the proposal. Your RCA is correct and the solution looks good to me. The |
Hmm, I don't know what the local variables would look like. One idea I could think of is to introduce a new object that stored both displayName and iouReportAmount.
and then in the sort below we can do like: -pinnedReports = _.sortBy(pinnedReports, (report) => report.displayName.toLowerCase());
-outstandingIOUReports = lodashOrderBy(outstandingIOUReports, ['iouReportAmount', (report) => report.displayName.toLowerCase()], ['desc', 'asc']);
+pinnedReports = _.sortBy(pinnedReports, (report) => reports[report.reportID].displayName.toLowerCase());
+outstandingIOUReports = lodashOrderBy(outstandingIOUReports, [(report) => reports[report.reportID].iouReportAmount, (report) => reports[report.reportID].displayName.toLowerCase()], ['desc', 'asc']);
and so on... haven't tested it yet. |
@bernhardoj Thanks for the update. Given that 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @AndrewGable, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@AndrewGable any thoughts here? |
📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
PR is ready cc: @s77rt |
🎯 ⚡️ Woah @s77rt / @bernhardoj, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.49-3 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-08-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.
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:
|
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:
|
|
Payouts due: Issue Reporter: $250 @bernhardoj Eligible for 50% #urgency bonus? Yes Upwork job is here. |
It's cool, we already have a contract in the works! :) |
Ah, you're right. I didn't see that 😅. Thanks! |
Everyone is paid 🎉 thanks for your work on this! |
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:
Requirement: have policy expense chat beta access and a workspace
Expected Result:
Workspace name is shown on the confirmation page
Actual Result:
Workspace name is not shown on the confirmation page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.43-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
Screen.Recording.2023-07-21.at.00.34.09.mov
Recording.3802.mp4
Expensify/Expensify Issue URL:
Issue reported by: @bernhardoj
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689870865032739
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: