You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Group - App crash when removing a member on the process splitting expense #46805
👋 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.
When user A add user B from group, the report?.policyId is _FAKE_ -> we get policy__FALE_
when A remove B, report?.report will be undefined -> we get policy_-1
In we have the logic to detect if policy__FALE_ and policy_-1 have the same collection key
Activity
melvin-bot commentedon Aug 5, 2024
Triggered auto assignment to @cristipaval (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Aug 5, 2024
Triggered auto assignment to @RachCHopkins (
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.github-actions commentedon Aug 5, 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:
melvin-bot commentedon Aug 5, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
daledah commentedon Aug 5, 2024
Edited by proposal-police: This proposal was edited at 2024-08-06 04:08:22 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
App Crash
What is the root cause of that problem?
we use
useOnyxto get policy InApp/src/pages/iou/request/IOURequestStartPage.tsx
Line 44 in 02d0d61
When user A add user B from group, the
report?.policyIdis_FAKE_-> we getpolicy__FALE_when A remove B,
report?.reportwill beundefined-> we getpolicy_-1In we have the logic to detect if
policy__FALE_andpolicy_-1have the same collection keyhttps://github.com/Expensify/react-native-onyx/blob/115542b601349d13114bf6784f645e44c02816d1/lib/useOnyx.ts#L112
But the logic to extract the collection key (splitCollectionMemberKey) is wrong
https://github.com/Expensify/react-native-onyx/blob/115542b601349d13114bf6784f645e44c02816d1/lib/OnyxUtils.ts#L409
we're using
lastIndexOfto get the index of_-> the collection key ofpolicy__FALE_ispolicy__FALE_the collection key of
policy_-1ispolicy_-> the condition is failed
-> the error is throw here
https://github.com/Expensify/react-native-onyx/blob/115542b601349d13114bf6784f645e44c02816d1/lib/useOnyx.ts#L121-L123
What changes do you think we should make in order to solve the problem?
Create
usePolicyhook to handle the policyID-defaulting logicWhat alternative solutions did you explore? (Optional)
daledah commentedon Aug 5, 2024
@cristipaval I can raise the PR soon if you agree with the solution. Thanks
43 remaining items
RachCHopkins commentedon Sep 9, 2024
Sorry @daledah did you apply for the upwork job per this comment? I do see one shortlisted proposal but I'm not 100% sure it's you.
RachCHopkins commentedon Sep 9, 2024
Ok, no it's not, I found your upwork profile and that is not you. I will set up the job again and send you another offer @daledah
@ishpaul777 forgive me if this is a silly question - did you get paid for this offer?
ishpaul777 commentedon Sep 9, 2024
Yes thats the offer i accepted, here's the contract https://www.upwork.com/nx/wm/workroom/38035610
RachCHopkins commentedon Sep 10, 2024
What I mean is, did you get paid money for it @ishpaul777 ?
ishpaul777 commentedon Sep 10, 2024
No, on automatic offers A BZ member need to release payment manually when the payment is due, i.e. 7 days after PR deplyed to Prod.
RachCHopkins commentedon Sep 11, 2024
Thanks for confirmation @ishpaul777 - I was looking at totally the wrong page! I've paid that out.
@daledah I'm just waiting on you to accept the proposal (and two others) so I can pay you.
RachCHopkins commentedon Sep 12, 2024
Payment Summary:
Upwork job here
RachCHopkins commentedon Sep 16, 2024
Contributor has been paid, the contract has been completed, and the Upwork post has been closed.