You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-07-22] [HOLD for payment 2024-07-17] [$250] Send invoice - "To" field displays Hidden instead of invoice receiver #43917
Version Number: 1.4.85-0 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:
Go to staging.new.expensify.com
Go to FAB > Send invoice.
Send invoice to a user.
Go to invoice chat.
Go to + > Send invoice.
Enter amount > Next.
Expected Result:
"To" field will display the invoice receiver
Actual Result:
"To" field displays Hidden instead of invoice receiver
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@slafortune 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
Please re-state the problem that we are trying to solve in this issue.
"To" field displays Hidden instead of invoice receiver
What is the root cause of that problem?
When we calculate participants in case of invoice room here we do not pass accountID
so at confirmation step participantAccountID will be equal to -1 and display hidden user here
What changes do you think we should make in order to solve the problem?
We need to pass accountID when we calculate participants
changed the title [-] Send invoice - "To" field displays Hidden instead of invoice receiver[/-][+][$250] Send invoice - "To" field displays Hidden instead of invoice receiver[/+]on Jun 18, 2024
If the participant has an accountID, we map it with getParticipantsOption, otherwise we map it with getReportOption. If we initiate the send invoice from the room/chat, the participant will contain a reportID, but not accountID.
With this information, we expect the participant to be mapped with getReportOption, however, this PR defaults the accountID to -1 (we previously defaulted it to 0).
changed the title [-][HOLD for payment 2024-07-17] [$250] Send invoice - "To" field displays Hidden instead of invoice receiver[/-][+][HOLD for payment 2024-07-22] [HOLD for payment 2024-07-17] [$250] Send invoice - "To" field displays Hidden instead of invoice receiver[/+]on Jul 15, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.6-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
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:
[@thesahindia] The PR that introduced the bug has been identified. Link to the PR:
[@thesahindia] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@thesahindia] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@thesahindia] Determine if we should create a regression test for this bug.
[@thesahindia] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@slafortune] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Activity
melvin-bot commentedon Jun 18, 2024
Triggered auto assignment to @slafortune (
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.lanitochka17 commentedon Jun 18, 2024
@slafortune 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
daledah commentedon Jun 18, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
"To" field displays Hidden instead of invoice receiver
What is the root cause of that problem?
When we calculate participants in case of invoice room here we do not pass
accountIDso at confirmation step
participantAccountIDwill be equal to -1 and display hidden user hereWhat changes do you think we should make in order to solve the problem?
We need to pass
accountIDwhen we calculate participantsWhat alternative solutions did you explore? (Optional)
result.mov
melvin-bot commentedon Jun 18, 2024
Job added to Upwork: https://www.upwork.com/jobs/~013c79d3cbeca420a5
[-] Send invoice - "To" field displays Hidden instead of invoice receiver[/-][+][$250] Send invoice - "To" field displays Hidden instead of invoice receiver[/+]melvin-bot commentedon Jun 18, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)bernhardoj commentedon Jun 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Hidden user is shown in the To section of send invoice from a chat.
What is the root cause of that problem?
On the confirmation page, the participant is mapped from the transaction participant data.
App/src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Lines 139 to 149 in 904d49d
If the participant has an accountID, we map it with
getParticipantsOption, otherwise we map it withgetReportOption. If we initiate the send invoice from the room/chat, the participant will contain areportID, but notaccountID.App/src/libs/actions/IOU.ts
Lines 6651 to 6659 in 904d49d
With this information, we expect the participant to be mapped with
getReportOption, however, this PR defaults the accountID to -1 (we previously defaulted it to 0).App/src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Line 142 in 904d49d
So, this condition thinks that the participant is a user.
App/src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Line 147 in 904d49d
What changes do you think we should make in order to solve the problem?
We have 2 options:
thesahindia commentedon Jun 19, 2024
@bernhardoj's proposal looks good to me!
🎀 👀 🎀 C+ reviewed
23 remaining items
[-][HOLD for payment 2024-07-17] [$250] Send invoice - "To" field displays Hidden instead of invoice receiver[/-][+][HOLD for payment 2024-07-22] [HOLD for payment 2024-07-17] [$250] Send invoice - "To" field displays Hidden instead of invoice receiver[/+]melvin-bot commentedon Jul 15, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.6-8 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 2024-07-22. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 15, 2024
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:
bernhardoj commentedon Jul 16, 2024
The payment should be due tomorrow (07-17)
bernhardoj commentedon Jul 17, 2024
Requested in ND.
slafortune commentedon Jul 18, 2024
@bernhardoj is due $250 for the Contributor role via NewDot
@thesahindia is due $250 for the C+ role via NewDot
JmillsExpensify commentedon Jul 19, 2024
$250 approved for @bernhardoj
JmillsExpensify commentedon Jul 19, 2024
$250 approved for @thesahindia