Repository navigation
[HOLD for payment 2024-06-13] [$250] Last message text are not shown when searching for the rooms #41816
Description
Activity
- addedDailyKSv2KSv2BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.
on May 7, 2024 Triggered auto assignment to @laurenreidexpensify (
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.Proposal
Please re-state the problem that we are trying to solve in this issue.
Showing the workspace chat name as last comment
What is the root cause of that problem?
In
getSearchOptions, we passforcePolicyNamePreviewastrueintogetOptionsfunctionApp/src/libs/OptionsListUtils.ts
Line 1996 in 55c56bf
forcePolicyNamePreview: true, So the alternateText is forced to the
policyNameby this condition
App/src/libs/OptionsListUtils.ts
Line 556 in 55c56bf
return showChatPreviewLine && !forcePolicyNamePreview && option.lastMessageText ? option.lastMessageText : option.subtitle; What changes do you think we should make in order to solve the problem?
We should remove param so it can have the default value is
falseand then the last message text is shown in search pageApp/src/libs/OptionsListUtils.ts
Line 1996 in 55c56bf
forcePolicyNamePreview: true, What alternative solutions did you explore? (Optional)
NA
Result
Proposal
Please re-state the problem that we are trying to solve in this issue.
Last message text are not shown when searching for the rooms
What is the root cause of that problem?
On the function
getAlternateTextpart ofOptionsListUtils
we have a condition between if we should displayoption.lastMessageTextoroption.subtitlefor chat roomApp/src/libs/OptionsListUtils.ts
Lines 555 to 557 in 55c56bf
if (!!option.isChatRoom || !!option.isPolicyExpenseChat) { return showChatPreviewLine && !forcePolicyNamePreview && option.lastMessageText ? option.lastMessageText : option.subtitle; } because
forcePolicyNamePreviewis always true, the condition goes tooption.subtitleWhat changes do you think we should make in order to solve the problem?
We should create a seperate condition for the chat room
if (option.isChatRoom) { return showChatPreviewLine && option.lastMessageText ? option.lastMessageText : option.subtitle; } if (option.isPolicyExpenseChat) { return showChatPreviewLine && !forcePolicyNamePreview && option.lastMessageText ? option.lastMessageText : option.subtitle; }
If we change forcePolicyNamePreview to false from getSearchOptions or remove it, this will effect also the Policy Expense Chat preview on the find page
POC;
What alternative solutions did you explore? (Optional)
NA
laurenreidexpensify commented
on May 8, 2024 ContributorMore actions@youssef-lr is this under vip-vsb?
@laurenreidexpensify Yes I think it fits there.
- addedExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributor
on May 9, 2024 - changed the title
[-]Last message text are not shown when searching for the rooms[/-][+][$250] Last message text are not shown when searching for the rooms[/+]on May 9, 2024 Job added to Upwork: https://www.upwork.com/jobs/~01d5ae7362185c5a44
- addedHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributors
on May 9, 2024 Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)34 remaining items
Reviewinglabel has been removed, please complete the "BugZero Checklist".The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 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-06-13. 🎊
For reference, here are some details about the assignees on this issue:
- @dragnoir requires payment (Needs manual offer from BZ)
- @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.
- [@laurenreidexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
laurenreidexpensify commented
on Jun 13, 2024 ContributorMore actionsPayment Summary -
- Contributor @dragnoir paid via Upwork $250
- C+ @rushatgabhane owed $250 via NewDot.
@rushatgabhane pls confirm regression steps and checklist thanks
Payment Summary
- ROLE: @dragnoir paid $(AMOUNT) via Upwork (LINK)
- Reviewer: @rushatgabhane owed $250 via NewDot
BugZero Checklist (@laurenreidexpensify)
- I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
- I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1788509395347320833/hired)
- I have paid out the Upwork contracts or cancelled the ones that are incorrect
- I have verified the payment summary above is correct
laurenreidexpensify commented
on Jun 14, 2024 ContributorMore actions@rushatgabhane pls confirm regression steps and checklist above so we can close thanks
-
The PR that introduced the bug has been identified. Link to the PR: This is a new behavior. Not a bug.
-
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: N.A.
-
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
1. Go to any room chat 2. Send a comment 3. Click on the search icon from LHN 4. Verify that the last posted comment is displayed under the room name in search page
-
@mallenexpensify can you please confirm the payment summary about with an amount for @rushatgabhane? I can't approve until I have that.
@JmillsExpensify , updated Lauren's payment breakdown above
- C+ @rushatgabhane owed $250 via NewDot.
$250 approved for @rushatgabhane
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsNo status

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.71-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: @youssef-lr
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1708669400849159
Action Performed:
Expected Result:
Last comment should display for the rooms
Actual Result:
Showing the workspace chat name as last comment
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @laurenreidexpensify