Skip to content

[Due for payment 2025-04-28] [$250] Expense preview - Expense preview shows "Receiver > Payer" instead of "Payer > Receiver" #59526

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

Closed
6 of 8 tasks
jponikarchuk opened this issue Apr 2, 2025 · 40 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

Comments

@jponikarchuk
Copy link

jponikarchuk commented Apr 2, 2025

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: 9.1.22-2
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp #58479
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Log in with Expensifail account,
  1. Go to staging.new.expensify.com
  2. Go to 1:1 DM.
  3. Click + > Pay user.
  4. Enter amount > Next.
  5. Click Pay elsewhere.

Expected Result:

The expense preview should show that "Payer > Receiver" (we can double confirm this iin Reports).

Actual Result:

The expense preview shows "Receiver > Payer" instead.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4
Image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021907390149084405396
  • Upwork Job ID: 1907390149084405396
  • Last Price Increase: 2025-04-02
Issue OwnerCurrent Issue Owner: @zanyrenney
@jponikarchuk jponikarchuk added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Apr 2, 2025
Copy link

melvin-bot bot commented Apr 2, 2025

Triggered auto assignment to @zanyrenney (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.

@zanyrenney
Copy link
Contributor

adding external

@zanyrenney
Copy link
Contributor

It is a minor UI adjustment, but if this is being stored or displayed incorrectly, we'll want a deeper investigation.

@zanyrenney zanyrenney added the External Added to denote the issue can be worked on by a contributor label Apr 2, 2025
@melvin-bot melvin-bot bot changed the title Expense preview - Expense preview shows "Receiver > Payer" instead of "Payer > Receiver" [$250] Expense preview - Expense preview shows "Receiver > Payer" instead of "Payer > Receiver" Apr 2, 2025
Copy link

melvin-bot bot commented Apr 2, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 2, 2025
Copy link

melvin-bot bot commented Apr 2, 2025

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

@samranahm
Copy link
Contributor

@jponikarchuk Just out of curiosity, do we really need to Login with Expensifail account? Is there some UIs limited to Expensifail accounts? cc @rushatgabhane

@ChavdaSachin
Copy link
Contributor

Proposal

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

Expense preview - Expense preview shows "Receiver > Payer" instead of "Payer > Receiver"

What is the root cause of that problem?

Small logical mistake during implementation here, managerID and ownerAccountID passed here are passed in reverse order.

const fromID = chooseIDBasedOnAmount(amount, managerID, ownerAccountID);
const toID = chooseIDBasedOnAmount(amount, ownerAccountID, managerID);

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

Change the order of managerID and ownerAccountID passed here.

const fromID = chooseIDBasedOnAmount(amount, managerID, ownerAccountID);
const toID = chooseIDBasedOnAmount(amount, ownerAccountID, managerID);

    const fromID = chooseIDBasedOnAmount(amount, ownerAccountID, managerID);
    const toID = chooseIDBasedOnAmount(amount, managerID, ownerAccountID);

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

NA

What alternative solutions did you explore? (Optional)

Could be corrected by fixing the function body of chooseIDBasedOnAmount to work inversely, or any other small similar change.

@rushatgabhane
Copy link
Member

LGTM 🎀👀🎀

#59526 (comment)

Copy link

melvin-bot bot commented Apr 2, 2025

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

@jponikarchuk
Copy link
Author

Just out of curiosity, do we really need to Login with Expensifail account? Is there some UIs limited to Expensifail accounts?

@samranahm We mean that the user should log in as Expensifail account, not Gmail account

@ChavdaSachin
Copy link
Contributor

@samranahm based on your question, it seems you're new here. I would recommend you to go through https://github.com/Expensify/App/blob/e15c63350bcfac084ec847372fc819a46eba301b/README.md and https://github.com/Expensify/App/blob/e15c63350bcfac084ec847372fc819a46eba301b/contributingGuides/CONTRIBUTING.md .

@ChavdaSachin
Copy link
Contributor

@rushatgabhane I am thinking to modify chooseIDBasedOnAmount to return a pair of [fromID, toID] so we need to call this function only in one way and hence it might reduce complexity and increase clarity.

Sounds good?

@rushatgabhane
Copy link
Member

rushatgabhane commented Apr 2, 2025

it doesn't have any other usage, so i think we should not touch it.

i agree that the function itself is really difficult wrap your head around.
maybe we can rename it to getPayerAccountId()

@nkdengineer
Copy link
Contributor

I think it's a backend issue. When user A pays an expense for user B, user A is the payer, and user B is the receiver. It's correct. The problem comes from the Reports page. The image below shows two transactions: the first one is user A creating a pay user for user B, and the second is user A creating an expense for user B. The backend is returning the wrong accountID and managerID of the pay transaction.

Image

@ChavdaSachin
Copy link
Contributor

tnx @nkdengineer.
I looked deeper into it and figured the managerID is payerID and the ownerID the payeeID is our conventional implementation.
And hence BE seems to be perfectly working, perhaps we need to fix search page as well.

@nkdengineer
Copy link
Contributor

I mean it's the wrong transaction data in snapshot.

@ChavdaSachin
Copy link
Contributor

@nkdengineer I checked again and for every transaction ManagerID reflects payer account and ownerID reflects receiver account and hence BE response is consistent.

@dylanexpensify dylanexpensify moved this to Bugs and Follow Up Issues in #expensify-bugs Apr 3, 2025
@melvin-bot melvin-bot bot added Overdue and removed Help Wanted Apply this label when an issue is open to proposals by contributors labels Apr 6, 2025
@ChavdaSachin
Copy link
Contributor

@zanyrenney
sorry to bother you,
I am kind of in need to be on Expensify-Slack channel for some discussion related to current issue.
But for last 6-7 months I am trying to get onboard on Expensify Slack channel but not receiving the invitation.
could you maybe invite me to the slack.

Thank you.

ps. Email: [email protected]

@rushatgabhane
Copy link
Member

rushatgabhane commented Apr 18, 2025

^ the discussion is Resolved but i don't think @ChavdaSachin is on slack

@deetergp
Copy link
Contributor

Hi @ChavdaSachin, unfortunately, we are stuck in the same situation with regard to Inviting new contributors into our Slack group. When you first tried to get in, were you asked to fill out a form? And if so, did you?

@ChavdaSachin
Copy link
Contributor

Yes I've filled the form.
And I've recently got an update here.

Also @ChavdaSachin you'll be invited to #expensify-open-source pretty soon. I need to create an automated process for new invites and I haven't been able to prioritize it quite yet.

So I should receive the invitation soon.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 21, 2025
@melvin-bot melvin-bot bot changed the title [$250] Expense preview - Expense preview shows "Receiver > Payer" instead of "Payer > Receiver" [Due for payment 2025-04-28] [$250] Expense preview - Expense preview shows "Receiver > Payer" instead of "Payer > Receiver" Apr 21, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 21, 2025
Copy link

melvin-bot bot commented Apr 21, 2025

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

Copy link

melvin-bot bot commented Apr 21, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.30-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-04-28. 🎊

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

Copy link

melvin-bot bot commented Apr 21, 2025

@rushatgabhane @zanyrenney @rushatgabhane The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 28, 2025
Copy link

melvin-bot bot commented Apr 28, 2025

Payment Summary

Upwork Job

BugZero Checklist (@zanyrenney)

  • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1907390149084405396/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@zanyrenney
Copy link
Contributor

hey @ChavdaSachin - you never applied to the job.

@zanyrenney
Copy link
Contributor

zanyrenney commented Apr 28, 2025

Please can you apply here? https://www.upwork.com/jobs/~021907390149084405396 I just tried to invite you to the job, but I'm unable to find you on upwork. @ChavdaSachin

@ChavdaSachin
Copy link
Contributor

@zanyrenney applied for the job.

Upwork profile: https://www.upwork.com/freelancers/~016a0f0a12bce54a49

@ChavdaSachin
Copy link
Contributor

@zanyrenney can you please accept the proposal and release the payment.
thank you.

@ChavdaSachin
Copy link
Contributor

@zanyrenney bump on above ^

@melvin-bot melvin-bot bot added the Overdue label Apr 30, 2025
@zanyrenney
Copy link
Contributor

taking a look!

@melvin-bot melvin-bot bot removed the Overdue label May 1, 2025
@zanyrenney
Copy link
Contributor

@ChavdaSachin all rehired!

@zanyrenney
Copy link
Contributor

offer is pending!

@ChavdaSachin
Copy link
Contributor

Accepted the offer

@zanyrenney
Copy link
Contributor

Payment summary

Reviewer: @rushatgabhane owed $250 via NewDot - please request $250 via ND.
ROLE: @ChavdaSachin paid $(AMOUNT) via Upwork (LINK) - paid $250 via upwork.

@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in #expensify-bugs May 1, 2025
@garrettmknight
Copy link
Contributor

$250 approved for @rushatgabhane

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
Projects
Status: Done
Development

No branches or pull requests

8 participants