Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 of 6 tasks
izarutskaya opened this issue Aug 29, 2023 · 71 comments
Closed
4 of 6 tasks

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

izarutskaya opened this issue Aug 29, 2023 · 71 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 29, 2023

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?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

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

2023-08-26.21-12-00.mp4
Bug1.mp4
bandicam.2023-08-29.01-19-43-102.mp4

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
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Aug 29, 2023
@melvin-bot melvin-bot bot changed the title Link Request Money not work [$1000] Link Request Money not work Aug 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

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

@akamefi202
Copy link
Contributor

akamefi202 commented Aug 29, 2023

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.

App/src/libs/actions/IOU.js

Lines 1760 to 1763 in cb98bec

function startMoneyRequest(iouType, reportID = '') {
resetMoneyRequestInfo(`${iouType}${reportID}`);
Navigation.navigate(ROUTES.getMoneyRequestRoute(iouType, reportID));
}

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.

if ((props.iou.amount === 0 && !props.iou.receiptPath) || shouldReset) {
navigateBack(true);
}

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?

const moneyRequestID = `${iouType}${reportID}`;
const shouldReset = iou.id !== moneyRequestID;
if (shouldReset) {
IOU.resetMoneyRequestInfo(moneyRequestID);
}

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

@melvin-bot melvin-bot bot added the Overdue label Sep 1, 2023
@bernhardoj
Copy link
Contributor

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.

    const navigateToNextPage = (currentAmount) => {
    const amountInSmallestCurrencyUnits = CurrencyUtils.convertToBackendAmount(Number.parseFloat(currentAmount));
    IOU.setMoneyRequestAmount(amountInSmallestCurrencyUnits);
    IOU.setMoneyRequestCurrency(currency);

    We don't want the user to skip inputting the amount, so we navigate them back.
    if ((props.iou.amount === 0 && !props.iou.receiptPath) || shouldReset) {
    navigateBack(true);
    }

    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

    App/src/libs/actions/IOU.js

    Lines 1836 to 1844 in 5db2445

    function navigateToNextPage(iou, iouType, reportID, report) {
    const moneyRequestID = `${iouType}${reportID}`;
    const shouldReset = iou.id !== moneyRequestID;
    // If the money request ID in Onyx does not match the ID from params, we want to start a new request
    // with the ID from params. We need to clear the participants in case the new request is initiated from FAB.
    if (shouldReset) {
    resetMoneyRequestInfo(moneyRequestID);
    }

    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
Copy link
Contributor

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
Copy link

melvin-bot bot commented Sep 4, 2023

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

@Christinadobrzyn
Copy link
Contributor

Thanks @hayata-suenaga! @ArekChr do you think we should wait on this one for refactoring based on #26214 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Sep 4, 2023
@ArekChr
Copy link
Contributor

ArekChr commented Sep 5, 2023

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
Copy link
Contributor

ArekChr commented Sep 5, 2023

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

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

📣 @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
Copy link

melvin-bot bot commented Sep 5, 2023

📣 @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
Copy link

melvin-bot bot commented Sep 5, 2023

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
Copy link
Contributor

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

@Christinadobrzyn
Copy link
Contributor

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
Copy link

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

⚠️ 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
Copy link

@akamefi202
Copy link
Contributor

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

@ArekChr
Copy link
Contributor

ArekChr commented Oct 12, 2023

Hi @Christinadobrzyn, It seems like the PR did not get merged. It was reverted, and the error is not reproducible anymore due to changes in the split bill feature. I'm thinking we go for a 25% payout of the agreed price, given the situation. What do you think?

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Oct 12, 2023

Ah thank you for catching that @ArekChr, okay the payment would be as follows here - #26214 (comment)

Can you double-check that looks correct?

@akamefi202 I'll leave a comment in this GH about overpayment here and see if it can be deducted from this job - #29219

@akamefi202
Copy link
Contributor

@Christinadobrzyn I agree. I will ask deduction when the issue is completed.

@Christinadobrzyn
Copy link
Contributor

Sounds good! Nothing yet from @le about the job so going to keep this open.

@thuyle04
Copy link

@Christinadobrzyn There seems to be a mistake here, my github account is Le Thi Thu Thuy, not le. So it's possible to tag the wrong person, please check carefully and help me correct it. Thanks
Screenshot from 2023-10-12 22-29-15

@thuyle04
Copy link

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

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

@Christinadobrzyn
Copy link
Contributor

Thanks @thuyle04 I thought that was a little strange - didn't think to look at the Slack post - thanks for showing that.

Can you accept this job offer so I can pay you? https://www.upwork.com/jobs/~01c8ed54f75760e5cc

@Christinadobrzyn
Copy link
Contributor

paid @thuyle04 based on #26214 (comment)

So I think this is all set!

@Christinadobrzyn
Copy link
Contributor

Talking this over with @mallenexpensify I requested a refund from @akamefi202 for $750 since the final amount that should have been paid was $250 and they were paid $1000.

@akamefi202
Copy link
Contributor

@Christinadobrzyn I will do refund once I paid. It's very soon.

@mallenexpensify
Copy link
Contributor

@Christinadobrzyn , reopening til refund is confirmed, so that I can then pay out

@Christinadobrzyn
Copy link
Contributor

okay monitoring the Upwork job for details about the refund - https://www.upwork.com/nx/wm/workroom/34742476/details

@mallenexpensify
Copy link
Contributor

I paid the other issue, please leave this open til the refund here is processed, thx

@Christinadobrzyn
Copy link
Contributor

@akamefi202 can you let me know when you've issued the refund? Thanks!

@akamefi202
Copy link
Contributor

@Christinadobrzyn I will do refund on Monday next week.

@mallenexpensify
Copy link
Contributor

@akamefi202 can you please confirm the refund? it doesn't look like we've received yet. Thanks.
image

@akamefi202
Copy link
Contributor

@Christinadobrzyn @mallenexpensify Sorry for late reply. I was OOO last week. I made the refund and I think we might close this issue now.

@mallenexpensify
Copy link
Contributor

Thanks @akamefi202 , confirming job was refunded.
image

Pretty sure we're good to close this.

@akamefi202
Copy link
Contributor

@mallenexpensify @Christinadobrzyn Could you please finish the contract on Upwork too?

@Christinadobrzyn
Copy link
Contributor

Thanks @mallenexpensify and @akamefi202 - I closed the contract in Upwork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

10 participants