-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[$250] Track > Categorize it flow - Unable to search for workspace chats if the reports are not visited previously #47854
Comments
Triggered auto assignment to @dylanexpensify ( |
@dylanexpensify 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 |
Edited by proposal-police: This proposal was edited at 2023-10-04T22:06:00Z. ProposalPlease re-state the problem that we are trying to solve in this issue.When categorizing a tracked expense, only previously visited workspaces are shown What is the root cause of that problem?When categorizing expense, we do an additional check to see if the workspace has categories enabled by checking if policyCategory for that workspace has at least 1 category enabled but currently, when you logout and then login, policyCategory is not being loaded for workspaces with categories enabled. It is only loaded for workspace where the category feature and all categories are disabled. This data is supposed to come from OpenApp request. When you open a report, then also policyCategory is populated which is why we start to see the workspace after it is opened once App/src/libs/OptionsListUtils.ts Line 1974 in 06f5b66
App/src/libs/OptionsListUtils.ts Lines 279 to 284 in 06f5b66
What changes do you think we should make in order to solve the problem?Update front end to check isCategoryEnabled in the policy then update here to call an API and load categories of the selected policy. What alternative solutions did you explore? (Optional)Considering that policyCategory loads for workspace without categories but not for workspaces with categories, this likely requires a fix from backend most likely for OpenApp. |
ProposalPlease re-state the problem that we are trying to solve in this issue.When submitting an expense and attempting to "Categorize" it into a workspace the "Categorize" modal does not show any options in the recent tab unless the user has opened each one of them in the current session. What is the root cause of that problem?The root cause of the problem is in What changes do you think we should make in order to solve the problem?We should change the approach to use the App/src/libs/OptionsListUtils.ts Lines 1974 to 1977 in 156f0a2
Should be replaced with: const reportOptionPolicy = policies?.[`${ONYXKEYS.COLLECTION.POLICY}${reportOption.policyID}`] ?? {};
if (reportOptionPolicy.areCategoriesEnabled) {
recentReportOptions.push(reportOption);
} And after that we need to remove the connection to What alternative solutions did you explore? (Optional) |
@dylanexpensify Eep! 4 days overdue now. Issues have feelings too... |
Job added to Upwork: https://www.upwork.com/jobs/~01570efd314fb561ac |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 ( |
@dylanexpensify I think it's BE bug, OpenApp API doesn't return the category of other WS if we have many workspaces. If it's intended behavior, do we have the API to load the category if needed? |
@dylanexpensify, @dukenv0307 Huh... This is 4 days overdue. Who can take care of this? |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@dylanexpensify, @dukenv0307 Still overdue 6 days?! Let's take care of this! |
@dylanexpensify @dukenv0307 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! |
@dylanexpensify, @dukenv0307 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
@dylanexpensify we need to get the answer to this to move it on. @thienlnam would be good to ask here for the Track > categorize it flow. |
Apologies, assigning star to me and getting clarification! |
This looks like an issue with createWorkspace not sending a pusher update for policy categories. I don't think that we did this on purpose to save onyx storage or anything so yeah this would require a BE fix |
Hm, I'm a bit confused. When you choose to |
Yeah, that should happen - but it sounds like we're not returning the categories of all the workspaces so we don't have those stored to determine which ones are compatible for the |
I've been chatting on this and have the context so I can take over the issue |
📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @jaydamani 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@jaydamani You can test the solution with the OpenPolicyCategoriesPage endpoint for now |
@thienlnam @dylanexpensify @jaydamani @dukenv0307 this issue is now 4 weeks old, please consider:
Thanks! |
It is working as expected. Should I raise a PR with this API or do you want to use a new one? New.Expensify.-.Google.Chrome.2024-09-20.01-03-45.mp4 |
I have a PR in review for a new endpoint called 'GetPolicyCategories', it's not live yet but should be early next week |
I will create a PR for frontend after new endpoint is deployed |
@thienlnam any updates? |
New endpoint is on staging right now, should be on prod later today |
@thienlnam, @dylanexpensify, @jaydamani, @dukenv0307 Eep! 4 days overdue now. Issues have feelings too... |
@thienlnam please share the details of new end point |
It's the same as OpenPolicyCategoriesPage, just a different alias GetPolicyCategories. You can use it in the exact same way |
Should be live now |
NICE! |
Created a PR here |
Nice! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.23-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
In Step 11, user should be able to search for other existing workspace chats
Actual Result:
In Step 11, user is unable to search for other existing workspace chats
The search only returns results after the workspace chats are visited (Step 14)
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6579117_1724318988637.20240822_172134.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: