Repository navigation
[HOLD for payment 2024-06-13] [HOLD for payment 2024-06-11] [$250] Tags - Console error when disabling tag when created offline on web, app crashes on iOS #42885
Description
Activity
Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Triggered auto assignment to @Gonals (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
github-actions commented on May 31, 2024
👋 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:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
@bfitzexpensify 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
We think this bug might be related to #wave-collect - Release 1
Proposal
Please re-state the problem that we are trying to solve in this issue.
Console error when disabling tag when created offline on web, app crashes on iOS
What is the root cause of that problem?
When we enable tags offline, PolicyTag.orderWeight will be undefined because this data is returned by the backend. Passing this undefined value will cause a console error to appear
| setWorkspaceTagEnabled(route.params.policyID, {[currentPolicyTag.name]: {name: currentPolicyTag.name, enabled: value}}, policyTag.orderWeight); |
What changes do you think we should make in order to solve the problem?
Instead of using PolicyTag.orderWeight we can use route.params.orderWeight here
| setWorkspaceTagEnabled(route.params.policyID, {[currentPolicyTag.name]: {name: currentPolicyTag.name, enabled: value}}, policyTag.orderWeight); |
Just like we are using in WorkspaceViewTagsPage.tsx
| Tag.setWorkspaceTagEnabled(policyID, tagsToDisable, route.params.orderWeight); |
We can also do it like this policyTag.orderWeight ?? route.params.orderWeight
Let's check other places where we have this issue and fix it
What alternative solutions did you explore? (Optional)
We can optimistically set this orderWeight. Or we can use 0
| Tag.setWorkspaceTagEnabled(policyID, tagsToDisable, 0); |
63 remaining items
@Gonals, @mountiny, @bfitzexpensify, @allgandalf, @tienifr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Payments complete.
@allgandalf, please complete the BZ checklist - thank you!
@bfitzexpensify , Another PR fixed this issue (Also i was not the C+ on that PR), do we still need a checklist here? LMK if yes, will provide over here :) thanks
@Gonals, @mountiny, @bfitzexpensify, @allgandalf, @tienifr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@allgandalf no then, we are all good. Closing this out.
@bfitzexpensify I haven't received payment as per this comment
@Nodebrute @allgandalf can you please share your Upwork profile links?
All paid out here, closing this out
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.78-2
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail: exp around https://expensify.testrail.io/index.php?/tests/view/4587396&group_by=cases:section_id&group_order=asc&group_id=296081
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:
Action Performed:
Expected Result:
Tag can be disabled.
Actual Result:
Tag cannot disabled. Console error shows up on web. App crashes on iOS.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6496889_1717113061649.crash_iOS.mp4
Bug6496889_1717113061645.tag_offline.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @bfitzexpensify