Open lanitochka17 opened 4 months ago
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.
App crashes when submitting an expense after disconnecting from NetSuite
This issue might happen if policyTagList
or any tags
within policyTagList is undefined or null.
function hasEnabledTags(policyTagList: Array<PolicyTagList[keyof PolicyTagList]>) {
if (!policyTagList) {
return false;
}
const policyTagValueList = policyTagList
.filter(tag => tag && tag.tags) // Ensure tag and tag.tags are defined
.map(({tags}) => Object.values(tags))
.flat();
return hasEnabledOptions(policyTagValueList);
}
We can check if we need to add similar checks as other places also.
CC: @luacmartins since I think you might be handling QBO/Netsuite bugs.
I think that'd be @yuwenmemon
Any plans to make this external?
Job added to Upwork: https://www.upwork.com/jobs/~01a7f4450015473810
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External
)
Setting this as external for the moment - @yuwenmemon is ooo until August 13th.
Netsuite - App crashes when submitting an expense after disconnecting from NetSuite
In https://github.com/Expensify/App/blob/459759d55963091c708d7271c29e0f95f3add658/src/libs/PolicyUtils.ts#L272, we filter out empty tags by checking policyTagListValue !== null
. However this is not enough, there could be empty tags that only has required
field, this empty tag, when not omitted in https://github.com/Expensify/App/blob/459759d55963091c708d7271c29e0f95f3add658/src/libs/PolicyUtils.ts#L272, is returned in the tag list and will cause the crash here because it doesn't have important fields like the tags
field.
We need to improve the empty tags filtering logic here https://github.com/Expensify/App/blob/459759d55963091c708d7271c29e0f95f3add658/src/libs/PolicyUtils.ts#L272 to filter out empty tags based on the name
field as well, if it's a valid tag, it will always have name
(we can see that name
is a required field here)
.filter((policyTagListValue) => policyTagListValue?.name)
This will ensure the policyTagsList
returned from getTagLists
is always correct and not only will it fix this crash in hasEnabledTags
but anywhere we use the policyTagLists
from getTagLists
will also behave correctly.
We can check by the existence of tags
field. Regardless, the fix needs to be in getTagLists
so policyTagLists
is correct and consistent everywhere it's used
@eVoloshchak, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Both proposals are fairly similar (different implementation, but same root cause and effectively the same fix, just in different place), I think we can proceed with @ShridharGoel's proposal
πππ C+ reviewed!
Triggered auto assignment to @marcaaron, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @ShridharGoel π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
@ShridharGoel when will you be able to raise a PR here?
https://github.com/Expensify/App/pull/47232 -> Marked as "InternalQA" since I don't have the credentials to Netsuite.
This issue has not been updated in over 15 days. @eVoloshchak, @marcaaron, @ShridharGoel, @bfitzexpensify eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
@eVoloshchak, @marcaaron, @ShridharGoel, @bfitzexpensify, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.
This shouldn't be closed, PR fixing this is still open and close to being merged
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.60-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-11-20. :confetti_ball:
For reference, here are some details about the assignees on this issue:
@eVoloshchak @bfitzexpensify @eVoloshchak The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Looks like this needs to be opened again for payment.
Payment complete to @ShridharGoel
@eVoloshchak - please complete the BZ checklist and I'll finalise the payment summary for your C+ work - thanks!
@eVoloshchak, @marcaaron, @ShridharGoel, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@eVoloshchak, @marcaaron, @ShridharGoel, @bfitzexpensify Huh... This is 4 days overdue. Who can take care of this?
@eVoloshchak, @marcaaron, @ShridharGoel, @bfitzexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
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: 9.0.14-2 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): N/A Issue reported by: Applause - Internal Team
Action Performed:
. Log in with a new expensifail account
Expected Result:
The expense is submitted to the workspace
Actual Result:
App crashes
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/43e8344d-9d28-4f0e-bbe9-1130ed71a8e5
logs (2).txt
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @eVoloshchak