Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.36k stars 2.78k forks source link

[HOLD for payment 2023-09-27] [$1000] Link Request Money not work #26214

Closed izarutskaya closed 10 months ago

izarutskaya commented 1 year ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Sign in on browser as User A
  2. Create a chat with multiple users
  3. Click the "+" green button icon in the chat and select Split Bill
  4. Copy the URL in the browser (should be https://staging.new.expensify.com/split/new) and send it to the user B
  5. Login on browser as User B -> go to chat User A
  6. Click on the link of Request Money user A just sent
  7. Enter the amount and press Next
  8. Notice the Amount page loads again

Expected Result:

Navigate to confirm the requested amount

Actual Result:

The screen to enter the amount of the Split Bill is displayed again

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: v1.3.57-5

Reproducible in staging?: Y

Reproducible in production?: Y

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/115492554/a0bd23d1-848a-4adc-9bb7-db93b459789f

https://github.com/Expensify/App/assets/115492554/1eae76c4-ee37-488f-8f78-64c76faae30c

https://github.com/Expensify/App/assets/115492554/0122c24f-96b9-41fc-8b5a-d5a9fc9a8852

Expensify/Expensify Issue URL:

Issue reported by: @Le Thi Thu Thuy

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692093712051379

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01354f2b491ad407b0
  • Upwork Job ID: 1696603285025492992
  • Last Price Increase: 2023-09-05
  • Automatic offers:
    • akamefi202 | Contributor | 26512355
melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @Christinadobrzyn (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~01354f2b491ad407b0

melvin-bot[bot] commented 1 year ago

Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ArekChr (External)

akamefi202 commented 1 year ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Request money link(Manual) does not work. It opens "Manual" tab of "Money Request" page again if the user clicks "Next" button. https://staging.new.expensify.com/request/new/manual

What is the root cause of that problem?

If the user opens "Manual" tab of "Request Money" page from FAB, it will call resetMoneyRequestInfo function. https://github.com/Expensify/App/blob/cb98bec57e43cdfbeb356b342054a53e47e59758/src/libs/actions/IOU.js#L1760-L1763

But if the user opens the tab from link, it won't call that function. The tab will be opened directly. So Onyx data won't be initialized.

https://github.com/Expensify/App/blob/cb98bec57e43cdfbeb356b342054a53e47e59758/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js#L87-L89 Then if the user clicks "Next" button, the app opens Participants page. But it goes back to "Request Money" page immediately because of missing initialization of data. As a result, the user will see "Manual" tab again.

What changes do you think we should make in order to solve the problem?

https://github.com/Expensify/App/blob/cb98bec57e43cdfbeb356b342054a53e47e59758/src/pages/iou/steps/NewRequestAmountPage.js#L127-L131

I think we need to call resetMoneyRequestInfo function in the mounting of NewRequestAmountPage component. So the function will be called when the user opens "Manual" tab of "Request Money" page from the link and it will initialize Onyx data.

What alternative solutions did you explore? (Optional)

N/A

bernhardoj commented 1 year ago

Pressing the Next button will initialize the data if needed, however, I see there are 2 issues here. To fix both issues, we need to confirm a few things.

  1. The Onyx update is late. Pressing the Next button will save the amount to the Onyx, but we already navigated to the participant page before the amount is saved. https://github.com/Expensify/App/blob/442820bae4bafa960115499f9102b68572fca89b/src/pages/iou/steps/NewRequestAmountPage.js#L131-L134 We don't want the user to skip inputting the amount, so we navigate them back. https://github.com/Expensify/App/blob/442820bae4bafa960115499f9102b68572fca89b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js#L74-L76 We previously had this kind of issue after updating the Onyx version and it was fixed by waiting for the Onyx merge to be completed, but looks like the solution gets reverted(?). Is there any specific reason behind the revert? @hannojg

  2. Pressing Next clears the data https://github.com/Expensify/App/blob/5db24452f475e51226be1d12ef5e8d47878d8879/src/libs/actions/IOU.js#L1836-L1844 If the ID in Onyx is not the same as the current ID, we reset the data. In our case, we didn't have any ID yet in the Onyx, so shouldReset is true. The problem here is that, if shouldReset is true we shouldn't reset all the data but only the participants and description (because pressing Next also saves the amount and the currency, resetting them will clear both). Here is how the previous code looks like. Fortunately, we have a plan to remove the money request reset logic. @hayata-suenaga can you confirm if we are still going with the plan? If yes, then we can just focus on the first issue above.

hayata-suenaga commented 1 year ago

I haven't read the original bug description of this issue, but yes, we want to refactor the navigation logic of money-request-related screens eventually

Is the bug pressing one? in that case, it's worth implementing a temporary fix, but otherwise, we can wait for this refactoring

(although I don't know when we can get to that refactoring)

melvin-bot[bot] commented 1 year ago

@ArekChr, @Christinadobrzyn Huh... This is 4 days overdue. Who can take care of this?

Christinadobrzyn commented 1 year ago

Thanks @hayata-suenaga! @ArekChr do you think we should wait on this one for refactoring based on https://github.com/Expensify/App/issues/26214#issuecomment-1703326483

ArekChr commented 1 year ago

Hi @hayata-suenaga, I don't think this bug is pressing one, It mostly works, but the user has to press the next two times. Also, I think this issue when the user opens the split bill link from the report is an edge case.

ArekChr commented 1 year ago

Proposal from @akamefi202 solves that problem effectively. Let's go with your solution

:ribbon: :eyes: :ribbon: C+ reviewed

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @thienlnam, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] commented 1 year ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] commented 1 year ago

📣 @akamefi202 🎉 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 📖

melvin-bot[bot] commented 1 year ago

📣 @Le! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
melvin-bot[bot] commented 1 year ago

The BZ member will need to manually hire Le for the Reporter role. Please store your Upwork details and apply to our Upwork job so this process is automatic in the future!

akamefi202 commented 1 year ago

Thank you for selecting my proposal. I will create PR in a short time.

Christinadobrzyn commented 1 year ago

reached out to reporter for an Upwork link - https://expensify.slack.com/archives/C049HHMV9SM/p1693944049927919?thread_ts=1692093712.051379&cid=C049HHMV9SM

CuongXuanLe commented 1 year ago

Reporter: Your Expensify account email: thuy.lethithu@antbuddy.com Upwork Profile Link: https://www.upwork.com/freelancers/~01fcd9ed589276332f

thienlnam commented 1 year ago

@CuongXuanLe Please follow the exact format in https://github.com/Expensify/App/issues/26214#issuecomment-1707062348 for your details to be stored!

CuongXuanLe commented 1 year ago

Contributor details Your Expensify account email: thuy.lethithu@antbuddy.com Upwork Profile Link: https://www.upwork.com/freelancers/~01fcd9ed589276332f

melvin-bot[bot] commented 1 year ago

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

thuyle04 commented 1 year ago

Contributor details Your Expensify account email: thuy.lethithu@antbuddy.com Upwork Profile Link: https://www.upwork.com/freelancers/~01fcd9ed589276332f

melvin-bot[bot] commented 1 year ago

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

akamefi202 commented 1 year ago

@ArekChr https://github.com/Expensify/App/pull/26854 PR is ready. Could you please review?

melvin-bot[bot] commented 1 year ago

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

On to the next one 🚀

melvin-bot[bot] commented 1 year ago

⚠️ Looks like this issue was linked to a Deploy Blocker here

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.

melvin-bot[bot] commented 1 year ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 1 year ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.71-12 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 2023-09-27. :confetti_ball:

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

melvin-bot[bot] commented 1 year ago

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:

ArekChr commented 1 year ago

The PR for this issue has been reverted, as Split Bill functionality has been moved from the FAB to the Request Money flow, and it introduced regression in the new flow.

akamefi202 commented 1 year ago

@ArekChr I will create PR again in the new flow soon. I was still able to confirm the bug.

akamefi202 commented 1 year ago

@ArekChr I created the PR again and updated the proposal through new flow. Please review again. https://github.com/Expensify/App/pull/27930 https://github.com/Expensify/App/issues/26214#issuecomment-1698207936

akamefi202 commented 1 year ago

@ArekChr Could you please review PR any time soon?

Christinadobrzyn commented 1 year ago

Not sure if payment is still on schedule. @thienlnam or @ArekChr do you have an update on this? or a review of this PR - https://github.com/Expensify/App/issues/26214#issuecomment-1729297263

If we are still on schedule what is the regression test steps for this?

Christinadobrzyn commented 1 year ago

It looks like there was a regression here but I'm not sure if it's been fixed. @ArekChr or @thienlnam can you provide an update on where we are with this?

thienlnam commented 1 year ago

Yeah looks like the original PR added a regression / didn't solve the bug so we're waiting on @ArekChr to review the new PR that the contributor put up

ArekChr commented 12 months ago

Hello, I was on sick leave last week, I will review this PR soon.

ArekChr commented 12 months ago

@akamefi202 What are the reproduce steps? After the split bill has been moved out from the fab button flow, it seems like this issue doesn't happen anymore.

akamefi202 commented 11 months ago

@ArekChr I'm not able to reproduce too. I think it is fixed now.

Christinadobrzyn commented 11 months ago

Asking QA to test again - https://expensify.slack.com/archives/C9YU7BX5M/p1696616853061489

Christinadobrzyn commented 11 months ago

Waiting to hear from QA - I can't reproduce this either.

Christinadobrzyn commented 11 months ago

QA confirmed they can't reproduce this either so I think we're good here.

So I think we're ready to pay out based on https://github.com/Expensify/App/issues/26214#issuecomment-1727191890?

If that's the case that would be...

Payouts due:

Issue Reporter: $250 @thuyle04 (old payment structure) Contributor: $250 (25% due to two regressions and https://github.com/Expensify/App/issues/26214#issuecomment-1740342917) @akamefi202 (old payment structure) Contributor+: NA

Eligible for 50% #urgency bonus? No due to regression

Upwork job here for @akamefi202 Upwork job here for @thuyle04 can you provide your Upwork link?

Sound right?

akamefi202 commented 11 months ago

@Christinadobrzyn I think it is $500 because original price was $1000.

Christinadobrzyn commented 11 months ago

Ah, it looks like Upwork auto-paid $1,000 to @akamefi202 on Oct 3rd, are you able to reject that payment? I'm not exactly sure what to do in this case

image

thuyle04 commented 11 months ago

Contributor details Your Expensify account email: thuy.lethithu@antbuddy.com Upwork Profile Link: https://www.upwork.com/freelancers/~01fcd9ed589276332f

melvin-bot[bot] commented 11 months ago

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

thuyle04 commented 11 months ago

@Christinadobrzyn this is my upwork link: https://www.upwork.com/freelancers/~01fcd9ed589276332f

akamefi202 commented 11 months ago

@Christinadobrzyn It's my fault. I didn't know that it will be auto-paid. How about receiving $500 less in next job?