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
[Due for payment 2025-03-03] [$250] Report - The report preview component in the workspace chat have NO red dot #56889
Version Number: v9.0.98-7 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/runs/view/31059/&group_by=cases:section_id&group_id=316343 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: Win 11 App Component: Money Requests
Action Performed:
Navigate to staging.new.expensify.com
Login as the member of the Workspace
Navigate to the workspace chat
Go to (+) > Create Expense
Request money with the following info
Amount: $50.00
Merchant: Starbucks
Create a second request with the same information
Amount: $50.00
Merchant: Starbucks
Expected Result:
The report preview component in the workspace chat contains a red dot
Actual Result:
The report preview component in the workspace chat have NO red dot
BTW I have noticed more inconsistencies on the condition for which we show RBR on ReportPreview, Request Preview and LHN for instance we don't show notice type violations in LHN but we do for report preview and so on. So if needed we can make all the RBR conditions consistent.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N / A
What alternative solutions did you explore? (Optional)
Since Permissions.canUseDupeDetection(allBetas ?? []) is always true after opening the beta to everyone, !Permissions.canUseDupeDetection(allBetas ?? []) is always false. However, instead of removing the entire condition, only !Permissions.canUseDupeDetection(allBetas ?? []) was removed.
As a result, hasWarningTypeViolation incorrectly returns false, causing ReportPreview to be displayed without RBR, as seen in:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We need to add the unit test for hasWarningTypeViolation in case there is only dupe detection violation and there is another violation then verify it returns true.
What alternative solutions did you explore? (Optional)
changed the title [-]Report - The report preview component in the workspace chat have NO red dot[/-][+][$250] Report - The report preview component in the workspace chat have NO red dot[/+]on Feb 18, 2025
changed the title [-][$250] Report - The report preview component in the workspace chat have NO red dot[/-][+][Due for payment 2025-03-03] [$250] Report - The report preview component in the workspace chat have NO red dot[/+]on Feb 24, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.4-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dominictb@mallenexpensify@dominictb The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes
Regression Test Proposal
Test:
Open ND
Login as the member of the Workspace
Navigate to the workspace chat
Go to (+) > Create Expense
Request money with the following info
Amount: $50.00
Merchant: Starbucks
Create a second request with the same information
Amount: $50.00
Merchant: Starbucks
Verify: The report preview component in the workspace chat contains a red dot
Activity
melvin-bot commentedon Feb 14, 2025
Triggered auto assignment to @mallenexpensify (
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.FitseTLT commentedon Feb 14, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-02-14 20:02:22 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Report - The report preview component in the workspace chat have NO red dot
What is the root cause of that problem?
We show RBR for duplicate transactions in money request view because we show rbr for onHold expenses
App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx
Line 181 in 47d24f3
But for report previews we don't show RBR for held expenses here
App/src/components/ReportActionItem/ReportPreview.tsx
Lines 229 to 236 in 47d24f3
What changes do you think we should make in order to solve the problem?
We should show RBR if there is a transaction on hold and the report is not fully approved or settled same as money request view here
App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx
Line 181 in 47d24f3
We can also show RBR for the workspace chat too in LHN similarly if a transaction under an iou report is on hold.
Optionally we can also show the RBR only if there are duplicate transaction on the iou report instead
BTW I have noticed more inconsistencies on the condition for which we show RBR on ReportPreview, Request Preview and LHN for instance we don't show notice type violations in LHN but we do for report preview and so on. So if needed we can make all the RBR conditions consistent.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N / A
What alternative solutions did you explore? (Optional)
mallenexpensify commentedon Feb 15, 2025
Asking for test case link in #QA cuz link in OP isn't working. I want to share the steps to confirm expected behaviour
Kalydosos commentedon Feb 15, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
The report preview component in the workspace chat have NO red dot
What is the root cause of that problem?
We do not display duplicates warnings as violations for reports previews
What changes do you think we should make in order to solve the problem?
To display duplicates warnings as violations we can just add an extra parameter here by changing the code from
App/src/libs/TransactionUtils/index.ts
Line 973 in 6dc792f
to
and use the new parameter here, changing from
App/src/libs/TransactionUtils/index.ts
Line 985 in 6dc792f
to
then setting the new parameter value here from
App/src/components/ReportActionItem/ReportPreview.tsx
Line 234 in 6dc792f
to
RESULT
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
None
IuliiaHerets commentedon Feb 16, 2025
Hi, @mallenexpensify. You can use this link to TR steps.
truph01 commentedon Feb 17, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
This regression originates from PR Remove dupe detection beta, which enabled the dupe detection beta for everyone. In the process, the logic:
was incorrectly updated in:
App/src/libs/TransactionUtils/index.ts
Lines 985 to 987 in ee29bcc
Since
Permissions.canUseDupeDetection(allBetas ?? [])is alwaystrueafter opening the beta to everyone,!Permissions.canUseDupeDetection(allBetas ?? [])is alwaysfalse. However, instead of removing the entire condition, only!Permissions.canUseDupeDetection(allBetas ?? [])was removed.As a result,
hasWarningTypeViolationincorrectly returnsfalse, causingReportPreviewto be displayed without RBR, as seen in:App/src/components/ReportActionItem/ReportPreview.tsx
Line 234 in 47d24f3
What changes do you think we should make in order to solve the problem?
App/src/libs/TransactionUtils/index.ts
Lines 985 to 987 in ee29bcc
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
hasWarningTypeViolationin case there is only dupe detection violation and there is another violation then verify it returns true.What alternative solutions did you explore? (Optional)
truph01 commentedon Feb 17, 2025
@mallenexpensify The behavior described in the expected behavior section is correct. This bug happened due to an accidental mistake when removing the dupe detection beta.
[-]Report - The report preview component in the workspace chat have NO red dot[/-][+][$250] Report - The report preview component in the workspace chat have NO red dot[/+]melvin-bot commentedon Feb 18, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021891656450308549168
16 remaining items
[-][$250] Report - The report preview component in the workspace chat have NO red dot[/-][+][Due for payment 2025-03-03] [$250] Report - The report preview component in the workspace chat have NO red dot[/+]melvin-bot commentedon Feb 24, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Feb 24, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.4-4 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 2025-03-03. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 24, 2025
@dominictb @mallenexpensify @dominictb The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
dominictb commentedon Feb 26, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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/53167/files#r1970851046
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes
Regression Test Proposal
Test:
Do we agree 👍 or 👎
tgolen commentedon Mar 3, 2025
Sounds good to me!
mallenexpensify commentedon Mar 5, 2025
Contributor: @truph01 paid $250 via Upwork
Contributor+: @dominictb paid $250 via Upwork
Test case here
Thx!