App
App copied to clipboard
[HOLD for payment 2024-01-26] [$250] [MEDIUM] IOU - IOU preview shows (none) in the main chat for request with receipt and no merchant
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: 1.4.21-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: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
- Go to FAB > Request money > Manual.
- Enter amount and select a user.
- On the confirmation page, click 3-dot menu > Add a receipt.
- Create the request after adding a receipt.
Expected Result:
IOU preview will not show (none) in the main chat. It won't show anything in that row, ie. now 1 request,
Actual Result:
IOU preview shows (none) in the main chat.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Native
- [x] Android: mWeb Chrome
- [x] iOS: Native
- [x] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/6398b2c7-ccc3-463f-9d34-35bee109dddf
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~0122c75a36981f1098
- Upwork Job ID: 1742578112847630336
- Last Price Increase: 2024-01-05
- Automatic offers:
- rojiphil | Contributor | 28092684
Job added to Upwork: https://www.upwork.com/jobs/~0122c75a36981f1098
Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Bug0 Triage Checklist (Main S/O)
- [ ] This "bug" occurs on a supported platform (ensure
Platformsin 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
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External)
Proposal
Please re-state the problem that we are trying to solve in this issue.
When entering in an IOU manually and then going to upload the receipt, the chat is showing none as the recipient.
What is the root cause of that problem?
The variable PARTIAL_TRANSACTION_MERCHANT which is set to "(none)" is being loaded here instead of receiptMissingDetails which is set to "Receipt missing details"
What changes do you think we should make in order to solve the problem?
We need to change out the variable from PARTIAL_TRANSACTION_MERCHANT to receiptMissingDetails or the other options listed below.
We need to set the variable being loaded to something else besides PARTIAL_TRANSACTION_MERCHANT if we want text there, but not sure receipt is missing details is what we want in replace of that. If we want to recipient or the person sending it, then we need to put that variable in instead.
Another option instead of "(none)" as the PARTIAL_TRANSACTION_MERCHANT we set it to "Receipt missing details" or something like "Not able to read merchant". Additionally maybe adding in a field to put the merchant name in if it can't read the receipt would be a good idea here.
π£ @lindseydortch! π£ 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:
- Make sure you've read and understood the contributing guidelines.
- 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.
- 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.
- Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01071c3a14964af0bb
β Contributor details stored successfully. Thank you for contributing to Expensify!
Proposal
Please re-state the problem that we are trying to solve in this issue.
(None) is displayed in report preview while we show empty value for merchant during money request generation.
What is the root cause of that problem?
Here, we format the merchant value for display. However, since (none) is a default text which do not display, we are not skipping here. This is the root cause.
What changes do you think we should make in order to solve the problem?
We can check if the merchant is partial and reset the formattedMerchant like this here to solve this problem.
if(TransactionUtils.isPartialMerchant(formattedMerchant)) {
formattedMerchant = null;
}
The helper function isPartialMerchant can be like this in TransactionUtils:
function isPartialMerchant(merchant: string): boolean {
return merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT || merchant === CONST.TRANSACTION.UNKNOWN_MERCHANT;
}
What alternative solutions did you explore? (Optional)
Was able to reproduce and updated the Expected Behaviour in the OP. @rushatgabhane plz review the proposals above. Thx
@mountiny @mallenexpensify This has the same root cause with https://github.com/Expensify/App/issues/33818 and https://github.com/Expensify/App/issues/33798 . So I think we should hold this issue
This has the same root cause with #33818 and #33798 . So I think we should hold this issue
@DylanDylann I am not sure if I understand the correlation (i.e. same root cause) between this issue and the mentioned ones. Can you please explain?
We can fix this now.
I think we want to create a helper method if it does not exist, which will check for partial merchant so isPartialMerchant that will be true if the merchant is (none) or Unknown Merchant.
I think this is super simple fix which I could otherwise give back to @waterim as PR author, but I will export it and make it $250 to reflect the scope of this issue.
@rushatgabhane can you please review the proposals?
Upwork job price has been updated to $250
@rushatgabhane can you have a look please?
@rojiphil's proposal LGTM π π π
Current assignee @mountiny is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
π£ @rojiphil π 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 π
@rojiphil can you please raise a PR? thanks!
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.27-1 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/34359
If no regressions arise, payment will be issued on 2024-01-26. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @rojiphil requires payment automatic offer (Contributor)
- @rushatgabhane requires payment through NewDot Manual Requests
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:
- [ ] [@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
- [ ] [@rushatgabhane] 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:
- [ ] [@rushatgabhane] 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:
- [ ] [@rushatgabhane] Determine if we should create a regression test for this bug.
- [ ] [@rushatgabhane] 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.
- [ ] [@mallenexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
-
The PR that introduced the bug has been identified. Link to the PR: https://github.com/Expensify/App/pull/33171
-
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: https://github.com/Expensify/App/pull/33171/files#r1495220198
-
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: N.A.
-
Determine if we should create a regression test for this bug. Yes
-
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
- Click FAB > Request money > Manual
- Enter amount and select a user.
- On the confirmation page, click 3-dot menu > Add a receipt.
- Create the request after adding a receipt.
- Verify that preview subtitle is not displayed in Report Preview. i.e. neither (none) nor 1 Request is displayed.
If no regressions arise, payment will be issued on 2024-01-26
@mallenexpensify Overdue on payment for almost a week now. Gentle bump on this.
Contributor: @rojiphil paid $250 via Upwork Contributor+: @rushatgabhane due $250 via NewDot
@rojiphil apologies for the delay
@rushatgabhane , can you please finish the checklist above so we can get this closed?
$250 approved for @rushatgabhane based on summary above.
sorry, didn't get time yet to complete the checklist
Please prioritize @rushatgabhane since it's been a month and we wanna get this closed.
@mallenexpensify all done https://github.com/Expensify/App/issues/33874#issuecomment-1915907523