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

[$250] Web - Scan-GBR instead of RBR displayed in LHN for Admin #47502

Closed
1 of 6 tasks
IuliiaHerets opened this issue Aug 15, 2024 · 27 comments
Closed
1 of 6 tasks

[$250] Web - Scan-GBR instead of RBR displayed in LHN for Admin #47502

IuliiaHerets opened this issue Aug 15, 2024 · 27 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Aug 15, 2024

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: v9.0.20-6
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4693685
Issue reported by: Applause Internal Team

Action Performed:

Precondition: There is a WS created, with an admin and an employee.

  1. Log in as the employee and submit a scan receipt to the WS
  2. While the receipt is scanning, edit the merchant field and leave the amount field empty( to trigger the error message and the RBR)
  3. Submit the expense and log out
  4. Log in as the admin
  5. Navigate to the WS chat in LHN

Expected Result:

The RBR is displayed in the LHN, in the request preview and the request details.

Actual Result:

For the Admin, there is a Green Dot displayed in the LHN, while in the request preview and details the dot is Red.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6532962_1720088723127.RBR-GBR.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01114847a6aa18235d
  • Upwork Job ID: 1824130592527843469
  • Last Price Increase: 2024-10-10
Issue OwnerCurrent Issue Owner: @mollfpr
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

Triggered auto assignment to @adelekennedy (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.

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@IuliiaHerets
Copy link
Author

@adelekennedy 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

@adelekennedy adelekennedy added the External Added to denote the issue can be worked on by a contributor label Aug 15, 2024
@melvin-bot melvin-bot bot changed the title Web - Scan-GBR instead of RBR displayed in LHN for Admin [$250] Web - Scan-GBR instead of RBR displayed in LHN for Admin Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01114847a6aa18235d

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

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

@daledah
Copy link
Contributor

daledah commented Aug 15, 2024

Proposal

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

For the Admin, there is a Green Dot displayed in the LHN, while in the request preview and details the dot is Red.

What is the root cause of that problem?

  • We only display the RBR in LHN if the action is taken by current user:
    if (ReportActionUtils.wasActionTakenByCurrentUser(parentReportAction) && ReportActionUtils.isTransactionThread(parentReportAction)) {

    if (!ReportActionsUtils.wasActionTakenByCurrentUser(action)) {

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

  • We should display RBR if the current user is admin.
  • So it:
    if (ReportActionUtils.wasActionTakenByCurrentUser(parentReportAction) && ReportActionUtils.isTransactionThread(parentReportAction)) {

    should be:
    const policyID = report?.policyID;
    const isAdmin = PolicyUtils.getPolicy(policyID)?.role === 'admin';
    if ((ReportActionUtils.wasActionTakenByCurrentUser(parentReportAction) || isAdmin) && ReportActionUtils.isTransactionThread(parentReportAction)) {

and

if (!ReportActionsUtils.wasActionTakenByCurrentUser(action)) {

should be:

        const report = getReport(action.reportID);
        const isAdmin = getPolicy(report?.reportID).role === 'admin';
        if (!ReportActionsUtils.wasActionTakenByCurrentUser(action) && !isAdmin) {

What alternative solutions did you explore? (Optional)

  • We can remove ReportActionsUtils.wasActionTakenByCurrentUser check in:
    if (ReportActionUtils.wasActionTakenByCurrentUser(parentReportAction) && ReportActionUtils.isTransactionThread(parentReportAction)) {

    and
    if (!ReportActionsUtils.wasActionTakenByCurrentUser(action)) {

@mollfpr
Copy link
Contributor

mollfpr commented Aug 20, 2024

We've discussed this extensively, and decided that we would treat the RBR on the LHN different than the money request view.

The RBR on the LHN should only show for the user that made the request. The RBRs on the report preview, money request preview, and the ones in the money request view, should show to every user that has access to them.

The reasoning we're using here is that the user that made the request is the one that should be guided towards taking actions to fix the RBR, and that guidance starts with the chat on the LHN.

Moreover, we don't want to hide RBRs in report previews, money request previews, or the money request view, to anyone that has access to the money requests. And if they have RBRs, we should show them because there's no value in hiding information from people that have access to it.

Quoting from #37044 (comment), it's expected that the RBR is only shown for the requestor. @adelekennedy Could you help confirm? Thanks!

Copy link

melvin-bot bot commented Aug 22, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Aug 22, 2024
@adelekennedy
Copy link

You're correct @mollfpr! I think we can close this one

Copy link

melvin-bot bot commented Aug 23, 2024

@mollfpr, @adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Aug 27, 2024

@mollfpr, @adelekennedy 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

Copy link

melvin-bot bot commented Aug 29, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Aug 29, 2024

@mollfpr @adelekennedy this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Aug 29, 2024

@mollfpr, @adelekennedy Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

@trjExpensify
Copy link
Contributor

What are we doing here? Isn't there still a bug insofar as the green dot on the workspace chat for the admin for an expense report that is $0 containing only the failed receipt scan? CC: @JmillsExpensify if I'm missing something, but seems like that shouldn't be there:

Image

Copy link

melvin-bot bot commented Sep 2, 2024

@mollfpr, @adelekennedy 12 days overdue. Walking. Toward. The. Light...

Copy link

melvin-bot bot commented Sep 5, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Sep 5, 2024
Copy link

melvin-bot bot commented Sep 5, 2024

This issue has not been updated in over 14 days. @mollfpr, @adelekennedy eroding to Weekly issue.

@melvin-bot melvin-bot bot removed the Overdue label Sep 5, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Sep 12, 2024

@mollfpr @adelekennedy this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

Copy link

melvin-bot bot commented Sep 19, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Sep 19, 2024
Copy link

melvin-bot bot commented Sep 26, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Sep 30, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

This issue has not been updated in over 15 days. @mollfpr, @adelekennedy eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Overdue labels Sep 30, 2024
Copy link

melvin-bot bot commented Oct 3, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@mollfpr
Copy link
Contributor

mollfpr commented Oct 9, 2024

@adelekennedy @trjExpensify What's the next step here?

I'm checking the latest main and here's the result.

Admin

Screenshot 2024-10-09 at 14 06 58

Employee

Screenshot 2024-10-09 at 14 07 10

The RBR in LHN is not showing for the admin.

Copy link

melvin-bot bot commented Oct 10, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@trjExpensify
Copy link
Contributor

Isn't there still a bug insofar as the green dot on the workspace chat for the admin for an expense report that is $0 containing only the failed receipt scan?

Great, looks like that's resolved then. Let's close it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants