[$250] mWeb - Send money-In send money report page, an extra skeleton preview is displayed
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 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 Issue reported by: Applause - Internal Team
Action Performed:
- Go to https://staging.new.expensify.com/
- Tap on a report with no previous conversation
- Tap plus icon -- send money 4.Enter an amount and tap next 5.Tap pay elsewhere 6.Open the newly created send money request
Expected Result:
In send money report page, an extra skeleton preview must not be displayed
Actual Result:
In send money report page, an extra skeleton preview is displayed
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Native
- [ ] Android: mWeb Chrome
- [ ] iOS: Native
- [ ] iOS: mWeb Safari
- [ ] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/d8b90e32-751f-4412-9101-7cecdc937004
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01523fec2621a20689
- Upwork Job ID: 1773847838939754496
- Last Price Increase: 2024-03-29
Triggered auto assignment to @hayata-suenaga (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.
@hayata-suenaga 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 that this bug might be related to #vip-vsp
I am going to take over this one, I think ti might be related to https://github.com/Expensify/App/pull/36657 @dukenv0307 @abdulrahuman5196 the issue is actually minor and I dont think its a blocker
@abdulrahuman5196 @dukenv0307 could you please test if this occurs also in revert of the PR?
Job added to Upwork: https://www.upwork.com/jobs/~01523fec2621a20689
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External)
Upwork job price has been updated to $250
Proposal
Please re-state the problem that we are trying to solve in this issue.
In send money report page, an extra skeleton preview is displayed
What is the root cause of that problem?
The root cause is found here.
const moneyRequestActions = reportActions.filter(
(action) => action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && action.originalMessage && action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE,
);
We are filtering out all report action types except CREATE. This causes the moneyRequestActions.length number to be incorrect when the originalMessage action type is PAY, for example.
What changes do you think we should make in order to solve the problem?
This depends on product requirements. Assuming we want to apply this flow for any IOU ReportAction we can drop the originalMessage filters like so:
const moneyRequestActions = reportActions.filter(
(action) => action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU
);
Alternatively, if we want to only allow certain types, we can extend the conditional. For example, if the types are PAY and CREATE, it would look like this:
const moneyRequestActions = reportActions.filter(
(action) =>
action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU &&
action.originalMessage &&
(action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE || action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.PAY),
);
What alternative solutions did you explore? (Optional)
N/A
@mountiny This is the regression of https://github.com/Expensify/App/pull/36657. But the problem is when we send money, the type of iouAction is pay, and then moneyRequestActions is empty.
Is it expected that the iouAction that is the iou preview in send money flow has type is pay.
@mountiny @abdulrahuman5196 The PR is ready for review.
@mountiny Does this need C+ review?
@dukenv0307 @mountiny
It looks like you used the root cause and second solution from my proposal for this PR. As I said, we simply extend the conditional to match the product requirements. Would you please confirm if you will award me the bug bounty since my work is being used for this?
@mmmbytes You can see the code change in my PR, this is different from your alternative solution and I just re-use the logic in ReportActionItem without using any proposal.
Thank you for your response, dukenv0307. For clarity, if you re-read my proposal you can see that I mentioned that depending on product requirements, we can extend the conditional to encompass other action types such as PAY.
This is what your PR has done. You extended the conditional to include PAY and TRACK. The only difference between my proposal and your PR is that you check for IOUDetails if the action type is PAY. This is a minor detail, but the logic is still the same.
📣 @abdulrahuman5196 🎉 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 📖
@mananjadhav Assigning @abdulrahuman5196 coming from the original PR
@mmmbytes Thank you for the proposal. Since this bug originated from recent PR, the guidelines suggest the PR author should be the one fixing it. Unfortunately, in this case, we have only confirmed that after you have already made the proposal.
Checking now
@mountiny I see. Thanks for clarifying this.
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.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/39326
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:
- @abdulrahuman5196 requires payment automatic offer (Contributor)
Issue is ready for payment but no BZ is assigned. @Christinadobrzyn you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!
Payouts due:
- [x] Contributor: $250 @abdulrahuman5196 (paid in Upwork - https://www.upwork.com/nx/wm/workroom/36962727/overview)
Upwork job is here.
@mananjadhav should you be paid as the C+?
@mananjadhav or @abdulrahuman5196 do we need a regression test?
@Christinadobrzyn I don’t think any payouts are needed. IIRC this was a regression.
Oh thanks @mananjadhav - sorry @abdulrahuman5196 I just requested a refund for the $250 paid to you via Upwork. sorry about that - I should have asked before paying. Let me know if I'm missing anything
@Christinadobrzyn done.
thank you @abdulrahuman5196 so sorry about that. I think this can be closed since there's no payments or regression test.
Closing but let me know if I'm missing anything