Skip to content

[HOLD for payment 2024-07-24] [$250] “Book a call” option is not there in Concierge. #45036

Closed

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: 9.0.5-5
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: @ShridharGoel
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1720464131738029

Action Performed:

  1. Go to concierge chat.
  2. Click on the header to open profile page.

Expected Result:

“Book a call” option should be there.

Actual Result:

“Book a call” option is not there.

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

book.a.call.mp4

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014b054cf89e8b9e03
  • Upwork Job ID: 1810634822789186398
  • Last Price Increase: 2024-07-09
  • Automatic offers:
    • ShridharGoel | Contributor | 103045098
Issue OwnerCurrent Issue Owner: @JmillsExpensify

Activity

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

    @melvin-bot

    Triggered auto assignment to @MitchExpensify (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 Jul 9, 2024

    @nkdengineer
    Contributor

    Proposal

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

    “Book a call” option is not there.

    What is the root cause of that problem?

    {isConcierge && guideCalendarLink && (
    <MenuItem
    title={translate('videoChatButtonAndMenu.tooltip')}
    icon={Expensicons.Phone}

    The isConcierge condition is false. Because in the Concierge report, there are two participants (the current user and concierge), participantAccountIDs.length will be 2

    App/src/libs/ReportUtils.ts

    Lines 1046 to 1049 in 7b558ef

    function isConciergeChatReport(report: OnyxInputOrEntry<Report>): boolean {
    const participantAccountIDs = Object.keys(report?.participants ?? {});
    return participantAccountIDs.length === 1 && Number(participantAccountIDs[0]) === CONST.ACCOUNT_ID.CONCIERGE && !isChatThread(report);
    }

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

    I think it make sense to update participantAccountIDs.length === 2 and add the condition to verify the second participant is the current user

    Number(participantAccountIDs[1]) === currentUserAccountID
    

    What alternative solutions did you explore? (Optional)

    NA

  4. ShridharGoel commented on Jul 9, 2024

    @ShridharGoel
    Contributor

    Proposal

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

    "Book a call" option is not present in Concierge profile page.

    What is the root cause of that problem?

    isConcierge condition becomes false because of flawed logic in isConciergeChatReport

    const isConcierge = ReportUtils.isConciergeChatReport(report);

    {isConcierge && guideCalendarLink && (
    <MenuItem
    title={translate('videoChatButtonAndMenu.tooltip')}
    icon={Expensicons.Phone}
    isAnonymousAction={false}
    onPress={SessionActions.checkIfActionIsAllowed(() => {
    LinkActions.openExternalLink(guideCalendarLink);
    })}

    The below would always return false since report.participants will also have the logged in user.

    App/src/libs/ReportUtils.ts

    Lines 1046 to 1049 in dd96852

    function isConciergeChatReport(report: OnyxInputOrEntry<Report>): boolean {
    const participantAccountIDs = Object.keys(report?.participants ?? {});
    return participantAccountIDs.length === 1 && Number(participantAccountIDs[0]) === CONST.ACCOUNT_ID.CONCIERGE && !isChatThread(report);
    }

    This would also lead to other bugs.

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

    Update the logic to this to filter out the logged in user before checking the number of participants and matching the ID of the one at 0th index.

    function isConciergeChatReport(report: OnyxInputOrEntry<Report>): boolean {
    const participantAccountIDs = Object.keys(report?.participants ?? {})
        .map(Number)
        .filter((accountID) => accountID !== currentUserAccountID);
    return participantAccountIDs.length === 1 && Number(participantAccountIDs[0]) === CONST.ACCOUNT_ID.CONCIERGE && !isChatThread(report);
    }
    
  5. ShridharGoel commented on Jul 9, 2024

    @ShridharGoel
    Contributor

    @mountiny Would I be having the first dibs based on the Slack conversation about this issue?

  6. self-assigned this
    on Jul 9, 2024
  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 9, 2024
  8. melvin-bot commented on Jul 9, 2024

    @melvin-bot
  9. changed the title [-]“Book a call” option is not there in Concierge.[/-] [+][$250] “Book a call” option is not there in Concierge.[/+] on Jul 9, 2024
  10. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 9, 2024
  11. melvin-bot commented on Jul 9, 2024

    @melvin-bot

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

  12. mountiny commented on Jul 9, 2024

    @mountiny
    Contributor

    @ShridharGoel yeah you have first dibs, however, can you please also link what caused this regression? Either the isConciergeChatReport is not used for anything very important or its been messing around with stuff for a while now

  13. 27 remaining items

  14. melvin-bot commented on Jul 17, 2024

    @melvin-bot

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

  15. melvin-bot commented on Jul 17, 2024

    @melvin-bot

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

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

  16. melvin-bot commented on Jul 17, 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:

    • [@jayeshmangwani] The PR that introduced the bug has been identified. Link to the PR:
    • [@jayeshmangwani] 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:
    • [@jayeshmangwani] 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:
    • [@jayeshmangwani] Determine if we should create a regression test for this bug.
    • [@jayeshmangwani] 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.
    • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. jayeshmangwani commented on Jul 17, 2024

    @jayeshmangwani
    Contributor

    Regression Test Proposal

    1. Open the Expensify app and log in.
    2. Go to Concierge chat.
    3. Click on the header to open profile page.
    4. Verify that we can see "Book a call" option

    Do we agree 👍 or 👎

  18. JmillsExpensify commented on Jul 26, 2024

    @JmillsExpensify
    Contributor

    Payment summary:

  19. JmillsExpensify commented on Jul 26, 2024

    @JmillsExpensify
    Contributor

    Contributor paid via Upwork and regression test created. Closing this issue! @jayeshmangwani please submit an expense via NewDot.

  20. jayeshmangwani commented on Aug 5, 2024

    @jayeshmangwani
    Contributor

    Requested as per #45036 (comment)

  21. mallenexpensify commented on Aug 6, 2024

    @mallenexpensify
    Contributor

    Contributor: @ShridharGoel paid $250 via Upwork
    Reviewer: @jayeshmangwani owed $250 via NewDot

  22. JmillsExpensify commented on Aug 6, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @jayeshmangwani

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

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions