Closed lanitochka17 closed 3 months ago
Triggered auto assignment to @greg-schroeder (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.
@greg-schroeder 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
Job added to Upwork: https://www.upwork.com/jobs/~01b66ef1fd86c13a9c
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External
)
The problem we are trying to solve here is that sometimes when we "Pay Someone" with an email account that is not registered with Expensify, we run into a bug that causes the text to say owes
instead of paid
after some time.
The root cause of this problem is that the latest report data is not being read from the Onxy data store. The report read from the allReports
here is outdated when read, saying that the Onxy report has a statusNum: 1
(REPORT.STATUS_NUM.OPEN), and thus rendering the default text of iou.payerOwes
. However, if we read the latest stored data in the Onxy report, the statusNum
would be 4 (REPORT.STATUS_NUM.REIMBURSED), which would cause the ReportUtils.isSettled
function to return true, and thus returns the correct iou.payerPaid
text here.
In order to solve this problem, we just need to read the latest Onxy report data when checking if the report isSettled
here. Once we have the latest data from the Onxy store, the statusNum
will be 4
and will equal REPORT.STATUS_NUM.REIMBURSED
, and the correct paid
text will show on the UI.
I explored changing the isSettled
to also check if report.statusNum == REPORT.STATUS_NUM.OPEN
, but that doesn't seem to make logical sense to see if a report is settled.
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Pretty sure this is a BE issue as the IOU displays correctly initially and then turns into a submitted expense once the SendMoneyElsewhere
call completes. SendMoneyElsewhere
returns an onyx update that sets the report to submitted:
{
"stateNum": 1,
"statusNum": 1,
}
cc @greg-schroeder
Ah, fair enough. Okay I will move Internal then
Updated
Waiting for an internal engineer to grab this
Same as above
@jjcoffee @greg-schroeder this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
No updates here yet
Still waiting for an engineer to pick this up as it's internal
Issue not reproducible during KI retests. (First week)
Issue not reproducible during KI retests. (Second week)
I'm going to close this as not reproducible, but please reopen if you disagree.
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: 1.4.76-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: N/A Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
It should remain as a paid IOU
Actual Result:
Payment turns into Submitted expense. It reverts back in a few seconds if you open the IOU or refresh the page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/180de32b-e892-497d-97f1-407b3d0f470b
View all open jobs on GitHub
Upwork Automation - Do Not Edit