Skip to content
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

[HOLD awaiting refund from overpayment] [$500] Details - Workspace split bill displays user name instead of workspace name to admin #29219

Closed
6 tasks done
kbecciv opened this issue Oct 10, 2023 · 33 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Oct 10, 2023

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.3.80.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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696924602489199

Action Performed:

  1. Open the app and login with user A
  2. Open the app using any other device and login with user B
  3. From user A, add user B as member in any of user A workspaces
  4. From user A, open workspace chat created newly after step 3
  5. From user B, click on green plus button situated in LHN of app
  6. From user B, click on request money->manual
  7. Type in any amount and click Next
  8. In the user list, click on split besides workspace report name used in step 3 and finish the request money process
  9. From user A, click on split bill message and observe that in details, instead of workspace name it displays username

Expected Result:

App should display workspace name besides workspace avatar in split bill details page

Actual Result:

App displays username name besides workspace avatar to admin user in split bill details page

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native
android.native.wrong.workspace.name.split.details.mp4
Android: mWeb Chrome
android.chrome.wrong.split.bill.workspace.name.mp4
iOS: Native
ios.native.split.bill.wrong.workspace.name.1.mov
iOS: mWeb Safari
ios.safari.wrong.split.bill.workspace.name.mov
MacOS: Chrome / Safari
mac.chrome.wrong.split.bill.workspace.name.mov
windows.chrome.wrong.workspace.name.split.bill.mp4
Recording.4932.mp4
MacOS: Desktop
mac.desktop.wrong.split.bill.workspace.name.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015f60ccd423ab1d2e
  • Upwork Job ID: 1711802547356061696
  • Last Price Increase: 2023-10-10
  • Automatic offers:
    • s77rt | Reviewer | 27154595
    • akamefi202 | Contributor | 27154596
    • dhanashree-sawant | Reporter | 27154598
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 10, 2023
@melvin-bot melvin-bot bot changed the title Details - Workspace split bill displays user name instead of workspace name to admin [$500] Details - Workspace split bill displays user name instead of workspace name to admin Oct 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in 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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

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

@akamefi202
Copy link
Contributor

akamefi202 commented Oct 10, 2023

Proposal

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

Workspace split bill displays user name instead of workspace name in split details.

What is the root cause of that problem?

function getPolicyExpenseReportOption(report) {
const expenseReport = policyExpenseReports[`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`];
const policyExpenseChatAvatarSource = ReportUtils.getWorkspaceAvatar(expenseReport);
const reportName = ReportUtils.getReportName(expenseReport);

The app gets the information to display inside getPolicyExpenseReportOption function.
And inside it, the app calls getReportName function to get name.

App/src/libs/ReportUtils.js

Lines 1798 to 1800 in b5445bd

if (isPolicyExpenseChat(report)) {
formattedName = getPolicyExpenseChatName(report, policy);
}

Inside getReportName function, it calls getPolicyExpenseChatName function to get the name of workspace.

App/src/libs/ReportUtils.js

Lines 1308 to 1310 in b5445bd

if (report.isOwnPolicyExpenseChat) {
return getPolicyName(report, false, policy);
}

But the getPolicyExpenseChatName function returns workspace name only if policy is owned by the user.
If not, it returns the name of owner.

As a result, we see the name of user B instead of the workspace name if we check split details as user A.
Because the policy is owned by user B.

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

We should call getPolicyName function directly inside getPolicyExpenseReportOption function.
Because we're always meant to get workspace name here.

const workspaceName = ReportUtils.getPolicyName(expenseReport);

What alternative solutions did you explore? (Optional)

N/A

@mallenexpensify
Copy link
Contributor

@s77rt can you please review @akamefi202 's proposal? Thx

@s77rt
Copy link
Contributor

s77rt commented Oct 11, 2023

@akamefi202 Thanks for the proposal. Your RCA is correct and the solution looks good to me 👍

🎀 👀 🎀 C+ reviewed
Link to proposal

@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 2023

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

@mallenexpensify
Copy link
Contributor

@lakchote 👀 please on the proposal above when ya have a min

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

📣 @akamefi202 🎉 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 📖

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

📣 @dhanashree-sawant 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@lakchote
Copy link
Contributor

@akamefi202 proposal LGTM.

@akamefi202
Copy link
Contributor

I accepted the offer and PR will be ready by today.

@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

🎯 ⚡️ Woah @s77rt / @akamefi202, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @akamefi202 got assigned: 2023-10-12 05:24:07 Z
  • when the PR got merged: 2023-10-13 06:19:36 UTC

On to the next one 🚀

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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:

  • [@s77rt] The PR that introduced the bug has been identified. Link to the PR:
  • [@s77rt] 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:
  • [@s77rt] 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:
  • [@s77rt] Determine if we should create a regression test for this bug.
  • [@s77rt] 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:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-23] [$500] Details - Workspace split bill displays user name instead of workspace name to admin [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [$500] Details - Workspace split bill displays user name instead of workspace name to admin Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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 2023-10-23. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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:

  • [@s77rt] The PR that introduced the bug has been identified. Link to the PR:
  • [@s77rt] 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:
  • [@s77rt] 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:
  • [@s77rt] Determine if we should create a regression test for this bug.
  • [@s77rt] 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:

@s77rt
Copy link
Contributor

s77rt commented Oct 16, 2023

@mallenexpensify
Copy link
Contributor

@s77rt what's your reasoning for not wanting a regression test for this?

@s77rt
Copy link
Contributor

s77rt commented Oct 18, 2023

@mallenexpensify Due to the nature of the bug I don't think it would resurface again where a regression test would be needed. Do you think we would be better with a test for this case?

@Christinadobrzyn
Copy link
Contributor

Hey @mallenexpensify - there was an accidental overpayment to @akamefi202 on this job (payment was $1000 but there were some regressions so the actual payment should have been $250).

Is it possible to adjust the payment from this one? cc @akamefi202

@s77rt
Copy link
Contributor

s77rt commented Oct 18, 2023

@Christinadobrzyn I think @akamefi202 can issue a refund for that past payment

@mallenexpensify
Copy link
Contributor

@Christinadobrzyn , I'd recommend requesting a refund on that job then, once it's confirmed, I can pay this one out. Assuming we do that, we should also update the title to reflect to hold (so I don't forget)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels Oct 23, 2023
@akamefi202
Copy link
Contributor

@mallenexpensify @s77rt Could you please finish this issue if you have any time?

@Christinadobrzyn
Copy link
Contributor

Ah okay, thanks @mallenexpensify I do see the option to request a refund on this job so I did that. Just a heads up @akamefi202 I requested a partial refund for this job through Upwork.

@akamefi202
Copy link
Contributor

@mallenexpensify Could you please pay here first? That $1000 payment was more than 3 weeks ago so that I don't have enough money for refund in Upwork now. I promise that I will do refund.

@mallenexpensify mallenexpensify changed the title [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [$500] Details - Workspace split bill displays user name instead of workspace name to admin [HOLD for payment 2023-10-23] [$500] Details - Workspace split bill displays user name instead of workspace name to admin Oct 24, 2023
@mallenexpensify
Copy link
Contributor

Oooof, that is a tricky situation @akamefi202. I just paid this

Issue reporter: @@dhanashree-sawant paid $50 via Upwork
Contributor: @akamefi202 paid $750 via Upwork. Please accept/pay the refund for the other job
Contributor+: @s77rt paid $750 via Upwork.

@s77rt I wasn't sure about the regression test so I created on, Applause/QA will do something with it if they think it'd be helpful
https://github.com/Expensify/Expensify/issues/329593

Gonna leave this open and a weekly til I'm able to confirm @akamefi202 's refund for the other issue.

@mallenexpensify mallenexpensify added Weekly KSv2 and removed Daily KSv2 labels Oct 24, 2023
@mallenexpensify mallenexpensify changed the title [HOLD for payment 2023-10-23] [$500] Details - Workspace split bill displays user name instead of workspace name to admin [HOLD awaiting refund from overpayment] [$500] Details - Workspace split bill displays user name instead of workspace name to admin Oct 26, 2023
@melvin-bot melvin-bot bot added the Overdue label Nov 2, 2023
@mallenexpensify
Copy link
Contributor

Awaiting refund on other issue
#26214 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Nov 3, 2023
@akamefi202
Copy link
Contributor

@mallenexpensify Sorry for late reply. I was OOO last week. I made the refund and I think we might close this issue now.

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Nov 6, 2023

Thanks @akamefi202 , confirming refund was issued for #26214

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants