IOU - Split btn for single contact became inactive when returned from final review
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: 1.4.58-4 Reproducible in staging?: Y Reproducible in production?: N 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:
Precondition: user should be Signed In
- Open https://staging.new.expensify.com/
- Click on FAB > Request money
- Select Manual tab
- Write any amount and click on Next button
- Click on a single contact
- Click on back button
- Click on the "Split" button for the same contact from step 5
Expected Result:
Selected contact should stick to the top and marked with a green checkmark when user clicked on a "Split" button for a single contact
Actual Result:
Nothing happened when user clicked on "Split" button. The split button for the single contact unresponsive on clicks
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [x] Android: Native
- [x] Android: mWeb Chrome
- [x] iOS: Native
- [x] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [x] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/42317d46-8b16-4de5-a741-d10ff7c2b062
Triggered auto assignment to @iwiznia (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
:wave: 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.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Split btn for single contact became inactive when returned from final review
What is the root cause of that problem?
When we select single participant it becomes an iouType = 'request'. But when we go back this participant is already selected in the onyx so when we hit split for the same participant it tries to save same data in onyx here:
https://github.com/Expensify/App/blob/99cc0b6f34c477dee40934b0ffb294e5dde1f58a/src/libs/actions/IOU.ts#L398-L401
And hence nothing changes and the tick circle does not re-render. hence we don't see the participant as selected but actually it is selected.
What changes do you think we should make in order to solve the problem?
When we go back from participant confirmation page we can reset the participant onyx data for type request so that when we select split on the same participant, the data is saved in onyx and hence it will re-render the list item. https://github.com/Expensify/App/blob/99cc0b6f34c477dee40934b0ffb294e5dde1f58a/src/pages/iou/request/step/IOURequestStepConfirmation.js#L166-L178
We need to pass iouType to the participant object so that it differs between request and split iouType. We need to do change in addSingleParticipant like:
{
..._.pick(option, 'accountID', 'login', 'isPolicyExpenseChat', 'reportID', 'searchText'),
selected: true,
+ iouType: iouType
},
and in addParticipantToSelection like:
{
accountID: option.accountID,
login: option.login,
isPolicyExpenseChat: option.isPolicyExpenseChat,
reportID: option.reportID,
selected: true,
searchText: option.searchText,
+ iouType: iouType === CONST.IOU.TYPE.REQUEST ? CONST.IOU.TYPE.SPLIT : iouType
},
What alternative solutions did you explore? (Optional)
Result
https://github.com/Expensify/App/assets/53095363/a159dee7-773f-4e1c-aef4-c66aa73afe95
Do you know what PR caused the regression @nexarvo?
Discussing alternatives here
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (External)
Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Fix was CP'd to staging 3 hours ago, lets see if we can get an applause member to help test this? 🙏
I cannot repro this anymore
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.58-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/39383
If no regressions arise, payment will be issued on 2024-04-09. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @nexarvo requires payment (Needs manual offer from BZ)
- @alitoshmatov requires payment (Needs manual offer from BZ)
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:
- [ ] [@alitoshmatov] The PR that introduced the bug has been identified. Link to the PR:
- [ ] [@alitoshmatov] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
- [ ] [@alitoshmatov] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
- [ ] [@alitoshmatov] Determine if we should create a regression test for this bug.
- [ ] [@alitoshmatov] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
- [ ] [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.60-13 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/39383
If no regressions arise, payment will be issued on 2024-04-15. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @nexarvo requires payment (Needs manual offer from BZ)
- @alitoshmatov requires payment (Needs manual offer from BZ)
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:
- [ ] [@alitoshmatov] The PR that introduced the bug has been identified. Link to the PR:
- [ ] [@alitoshmatov] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
- [ ] [@alitoshmatov] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
- [ ] [@alitoshmatov] Determine if we should create a regression test for this bug.
- [ ] [@alitoshmatov] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
- [ ] [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
I'm a little confused and have a few questions regarding this issue:
- Was there a regression from this issue, or is this issue fixing a regression?
- There's no price mentioned in the issue title - Are we paying out the standard $500?
- Shouldn't this be ready for payment today instead of next week since it was deployed to prod on Apr 2?
Asked those questions in Slack: https://expensify.slack.com/archives/C01GTK53T8Q/p1712951143397419
@sakluger this issue fixed a deploy blocker and there is no regression reported for this issue. Also, creating Upwork job failed when it was made external. I think this will be a $500 as it was assigned and made external before we made standard as $250.
This was handled without my involvement, so no payment for me
Thank you @nexarvo! I've sent you an offer via Upwork here: https://www.upwork.com/nx/wm/offer/101873610.
Payment Summary
Upwork Job
- Contributor: @nexarvo paid $500 via Upwork (LINK)
- ~ROLE: @alitoshmatov paid $(AMOUNT) via Upwork (LINK)~
BugZero Checklist (@sakluger)
- [x] I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
- [x] I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
- [x] I have paid out the Upwork contracts or cancelled the ones that are incorrect
- [x] I have verified the payment summary above is correct
All paid, thanks everyone!