Skip to content

[HOLD for payment 2024-06-13] [$250] Last message text are not shown when searching for the rooms #41816

Description

@m-natarajan

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:

  1. Open app
  2. Click on Find icon

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?

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

Screenshots/Videos

Add any screenshot/video evidence

Screenshot 2024-05-07 174932

IMG_6381

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d5ae7362185c5a44
  • Upwork Job ID: 1788509395347320833
  • Last Price Increase: 2024-05-09
Issue OwnerCurrent Issue Owner: @laurenreidexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 7, 2024
  2. melvin-bot commented on May 7, 2024

    @melvin-bot

    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.

  3. nkdengineer commented on May 8, 2024

    @nkdengineer
    Contributor

    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 pass forcePolicyNamePreview as true into getOptions function

    forcePolicyNamePreview: true,

    So the alternateText is forced to the policyName by this condition

    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 false and then the last message text is shown in search page

    forcePolicyNamePreview: true,

    What alternative solutions did you explore? (Optional)

    NA

    Result

    Screenshot 2024-05-08 at 10 52 10
  4. dragnoir commented on May 8, 2024

    @dragnoir
    Contributor

    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 getAlternateText part of OptionsListUtils
    we have a condition between if we should display option.lastMessageText or option.subtitle for chat room

    if (!!option.isChatRoom || !!option.isPolicyExpenseChat) {
    return showChatPreviewLine && !forcePolicyNamePreview && option.lastMessageText ? option.lastMessageText : option.subtitle;
    }

    because forcePolicyNamePreview is always true, the condition goes to option.subtitle

    What 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;

    image

    What alternative solutions did you explore? (Optional)

    NA

  5. laurenreidexpensify commented on May 8, 2024

    @laurenreidexpensify
    Contributor

    @youssef-lr is this under vip-vsb?

  6. youssef-lr commented on May 8, 2024

    @youssef-lr
    Contributor

    @laurenreidexpensify Yes I think it fits there.

  7. 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
  8. melvin-bot commented on May 9, 2024

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 9, 2024
  10. melvin-bot commented on May 9, 2024

    @melvin-bot

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

  11. 34 remaining items

  12. melvin-bot commented on Jun 6, 2024

    @melvin-bot

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

  13. melvin-bot commented on Jun 6, 2024

    @melvin-bot

    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
  14. melvin-bot commented on Jun 6, 2024

    @melvin-bot

    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:
  15. laurenreidexpensify commented on Jun 13, 2024

    @laurenreidexpensify
    Contributor

    Payment Summary -

    @rushatgabhane pls confirm regression steps and checklist thanks

  16. melvin-bot commented on Jun 13, 2024

    @melvin-bot

    Payment Summary

    Upwork Job

    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
  17. laurenreidexpensify commented on Jun 14, 2024

    @laurenreidexpensify
    Contributor

    @rushatgabhane pls confirm regression steps and checklist above so we can close thanks

  18. rushatgabhane commented on Jun 16, 2024

    @rushatgabhane
    Member
    1. The PR that introduced the bug has been identified. Link to the PR: This is a new behavior. Not a bug.

    2. 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.

    3. 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.

    4. Determine if we should create a regression test for this bug. Yes

    5. 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
      
  19. JmillsExpensify commented on Jun 23, 2024

    @JmillsExpensify
    Contributor

    @mallenexpensify can you please confirm the payment summary about with an amount for @rushatgabhane? I can't approve until I have that.

  20. mallenexpensify commented on Jun 24, 2024

    @mallenexpensify
    Contributor
  21. JmillsExpensify commented on Jun 25, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @rushatgabhane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions