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 for payment 2024-07-22] [HOLD for payment 2024-07-17] [$250] Send invoice - "Chat Report" appears in room mention list after sending invoice #43988

Closed
6 tasks done
izarutskaya opened this issue Jun 19, 2024 · 38 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Jun 19, 2024

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.85-4
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Type #.
  4. Note that there is no Chat report in the mention list.
  5. Go to FAB > Send invoice.
  6. Send invoice to anyone under the same workspace.
  7. Go to workspace chat.
  8. Type #.
  9. Select Chat Report from the list.

Expected Result:

If Chat Report is a valid room mention, selecting it from the list should result in highlighted #Chat Report in the composer.

Actual Result:

Selecting Chat Report from room mention list does not highlight the mention. # disappears.

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

20240619_124104.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01327604e093a2db66
  • Upwork Job ID: 1803444749926103230
  • Last Price Increase: 2024-06-19
  • Automatic offers:
    • ahmedGaber93 | Reviewer | 102956284
    • bernhardoj | Contributor | 102956286
Issue OwnerCurrent Issue Owner: @slafortune
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 19, 2024
Copy link

melvin-bot bot commented Jun 19, 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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #vip-vsb

@bernhardoj
Copy link
Contributor

Proposal

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

A "Chat report" shown in the report mentions suggestions after sending an invoice.

What is the root cause of that problem?

A report will show in the suggestion if it passes the canReportBeMentionedWithinPolicy condition.

App/src/libs/ReportUtils.ts

Lines 6934 to 6940 in e0ff35b

function canReportBeMentionedWithinPolicy(report: OnyxEntry<Report>, policyID: string): boolean {
if (report?.policyID !== policyID) {
return false;
}
return isChatRoom(report) && !isThread(report);
}

An invoice room is considered a chat room.

App/src/libs/ReportUtils.ts

Lines 968 to 970 in e0ff35b

function isChatRoom(report: OnyxEntry<Report>): boolean {
return isUserCreatedPolicyRoom(report) || isDefaultRoom(report) || isInvoiceRoom(report);
}

The invoice room has a Chat report as the name. Chat report is basically a default name for a report. If you see the invoice room header, the name isn't Chat room because there is another logic to get the invoice room name.

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

I don't think we should include the invoice room as a mentionable room because it's not a room that follows a room name condition that starts with a #. So, I suggest ignoring the invoice room in canReportBeMentionedWithinPolicy.

return isChatRoom(report) && !isInvoiceRoom(report) && !isThread(report);

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label Jun 19, 2024
Copy link

melvin-bot bot commented Jun 19, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01327604e093a2db66

@melvin-bot melvin-bot bot changed the title Send invoice - "Chat Report" appears in room mention list after sending invoice [$250] Send invoice - "Chat Report" appears in room mention list after sending invoice Jun 19, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 19, 2024
Copy link

melvin-bot bot commented Jun 19, 2024

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

@ahmedGaber93
Copy link
Contributor

@bernhardoj's proposal LGTM!

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jun 20, 2024

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

@iwiznia
Copy link
Contributor

iwiznia commented Jun 21, 2024

Hmmmm the proposal kind of makes sense as in I think will solve the issue, but the invoice room is kind of a chat room I think.... so not sure if it is technically correct.

I see this was added here #40303 as part of the Invoicing v1 project. So let's ask @rezkiy37, @cristipaval and @madmax330

@rezkiy37
Copy link
Contributor

It wasn't mentioned in the doc. So we need to clarify with Exfy devs.

@melvin-bot melvin-bot bot added the Overdue label Jun 24, 2024
@cristipaval
Copy link
Contributor

The invoice room is a private workspace room. So, it makes much sense from the user standpoint to be mentionable. Is it possible to mention workspace chats? As part of the Invoicing v1 project, we want to make the invoice rooms behave as much as possible, such as workspace chats. cc'ing @davidcardoza to confirm.

@ahmedGaber93
Copy link
Contributor

Not overdue, still discussing #43988 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Jun 24, 2024
@davidcardoza
Copy link
Contributor

An invoice room mention should follow the same pattern as a workspace chat mention. There has been no proposal for an invoice room mention to deviate from the behavior of a workspace room.

@ahmedGaber93
Copy link
Contributor

If we will allow the invoice room to be mentionable, what is the mentionable roomName in this case

@davidcardoza
Copy link
Contributor

The mentionable roomName should be the room title, using your video in the GH OP as an example, the mention would look like #maggot

For some background the roomName of an invoice room changes based on who is viewing the room.

  • An invoice receiver will see the roomName as %senderWorkspaceName%
  • An invoice sender will see a different roomName will see either : %receiverDisplayName% (or primaryLogin fallback if one isn't set) or %receiverWorkspaceName% based on if the invoice receiver is an existing Expensify workspace admin

@bernhardoj
Copy link
Contributor

But a user display name can have multiple words and a room mention pattern is #{singleWord}. This mention only works for #admins, #announce, and user-created policy room.

@davidcardoza
Copy link
Contributor

Interesting, let me bring this up in Slack.

@melvin-bot melvin-bot bot added the Overdue label Jun 28, 2024
@davidcardoza
Copy link
Contributor

@ahmedGaber93
Copy link
Contributor

Not overdue, still Discussing

@melvin-bot melvin-bot bot removed the Overdue label Jun 28, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 2, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @ahmedGaber93

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 10, 2024
@melvin-bot melvin-bot bot changed the title [$250] Send invoice - "Chat Report" appears in room mention list after sending invoice [HOLD for payment 2024-07-17] [$250] Send invoice - "Chat Report" appears in room mention list after sending invoice Jul 10, 2024
Copy link

melvin-bot bot commented Jul 10, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 10, 2024
Copy link

melvin-bot bot commented Jul 10, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.5-13 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-17. 🎊

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

Copy link

melvin-bot bot commented Jul 10, 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:

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

@bernhardoj
Copy link
Contributor

I'll request in ND once payment is due.

@slafortune
Copy link
Contributor

Ended contract for this GH with UpWorks

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jul 15, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-07-17] [$250] Send invoice - "Chat Report" appears in room mention list after sending invoice [HOLD for payment 2024-07-22] [HOLD for payment 2024-07-17] [$250] Send invoice - "Chat Report" appears in room mention list after sending invoice Jul 15, 2024
Copy link

melvin-bot bot commented 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:

Copy link

melvin-bot bot commented 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:

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

@bernhardoj
Copy link
Contributor

Payment should be due tomorrow (07-17)

@ahmedGaber93
Copy link
Contributor

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:

Regression Test Proposal

  1. Click FAB > Send invoice.
  2. Send an invoice to anyone under a workspace.
  3. In the invoice room, type #
  4. Verify there is no Chat Report in the list

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 16, 2024
@bernhardoj
Copy link
Contributor

Requested in ND.

@ahmedGaber93
Copy link
Contributor

@slafortune Could you please pay out this when you have a chance. Thanks!

@slafortune
Copy link
Contributor

@ahmedGaber93 Paid $250 for the C+ role via UpWorks

@bernhardoj is owed $250 for the Contributor Role via NewDot

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

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

No branches or pull requests

9 participants