Closed lanitochka17 closed 1 month ago
Triggered auto assignment to @Christinadobrzyn (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.
@Christinadobrzyn 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
Oh yeah this is a good catch - I think it's part of Wave- Collect. I'm not sure if this needs to be internal but let's start external.
Job added to Upwork: https://www.upwork.com/jobs/~01bcec74253fa9dcd4
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil (External
)
The expense displays “From user B to user A”, where user B is the receiver and user A is the payer.
The video attached to this Issue does not match the problem mentioned, but following what is written in “Action Performed” I believe I have reproduced the problem.
The ParentNavigationSubtitle.tsx
component is rendering the content using the translate()
function, passing the 'threads.from'
string as a parameter.
If this is not the problem, I apologize for the misinterpretation.
I suggest making an addition to threads
in the file src/languages/en.ts
to include the to
option.
threads: {
to: 'To',
...
},
This way, we can use ...translate('threads.to')
in the ParentNavigationSubtitle.tsx
component to render the content correctly.
The updated content is shown below:
📣 @tufcoder! 📣 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:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: oswaldogpc@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01f8fa45648f96ad67
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
The expense displays "From User B to User A", where User B is the receiver and User A is the payer.
In case of Pay someone
, in here, the user of transactionItem.managerID
is the one who send the money, and user of transactionItem.accountID
is the receiver. Hence the issue.
In general, we can assume that in case the transaction is IOU type:
managerID
is the receiver, accountID
is the sender.accountID
is the receiver, the managerID
is the sender.Hence, in this case, we want to swap the formattedFrom
and formattedTo
in here.
const isIOUReport = transactionItem.reportType === CONST.REPORT.TYPE.IOU;
let formattedFrom = from?.displayName ?? from?.login ?? '';
let formattedTo = to?.name ?? to?.displayName ?? to?.login ?? '';
if(isIOUReport && (transactionItem?.modifiedAmount || transactionItem.amount) > 0) {
[formattedFrom, formattedTo] = [formattedTo, formattedFrom];
}
NA
Hi @rojiphil can you review these proposals when you have a moment? TY!
Please disregard my proposal because it is not in line with the problem.
@luacmartins for vis on this one.
@rojiphil can you take a peek at this proposal thank you! - https://github.com/Expensify/App/issues/45611#issuecomment-2236415812
Reviewing today
I think @dominictb has the correct RCA, but IMO this should be fixed on the server so we send the correct values to the client and there's no need for further data manipulation.
Hmm we already have similar logic in the backend, but I'm not sure that comparing just reportType
and amounts is enough. I wonder if we also need to check if this is a Send money
request or not. cc @mountiny do you know?
Yeah thats fair @luacmartins I think we could add check for the IOUDetails in message to confirm its Send money flow
@mountiny so it's not enough to compare the report type and amount sign for the paid case, right? We also need to identify that the request type for send
?
yeah I think that we ideally check for the type=pay && IOUDetails.size() like here wherever we need to catch the send money flow
@rojiphil, @luacmartins, @Christinadobrzyn Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
PR in review
The PR looks like it's been deployed already! Wow! I'll keep an eye out for the payment automessage
This issue was worked on internally. Not sure if there's any payment due here.
Not sure if there's any payment due here.
yea... no payment for me here
Oh perfect, thanks for confirming. Since there are no payments - Do you want me to just close this out now or wait for the 7-day window @luacmartins?
Thanks for asking! We can close this out, since the backend PR was deployed and the issue is fixed.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.8-1 Reproducible in staging?: Y Reproducible in production?: Y 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:
Expected Result:
The expense should display "From User A to User B"
Actual Result:
The expense displays "From User B to User A", where User B is the receiver and User A is the payer.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/28634f64-536c-4db0-bb6d-a0d565289f2b
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @luacmartins