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-24] [$250] “Book a call” option is not there in Concierge. #45036

Closed
1 of 6 tasks
m-natarajan opened this issue Jul 9, 2024 · 28 comments
Closed
1 of 6 tasks
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

@m-natarajan
Copy link

m-natarajan commented Jul 9, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 9, 2024
Copy link

melvin-bot bot commented Jul 9, 2024

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.

@nkdengineer
Copy link
Contributor

nkdengineer commented Jul 9, 2024

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

@ShridharGoel
Copy link
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);
}

@ShridharGoel
Copy link
Contributor

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

@mountiny mountiny self-assigned this Jul 9, 2024
@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Jul 9, 2024
Copy link

melvin-bot bot commented Jul 9, 2024

Job added to Upwork: https://www.upwork.com/jobs/~014b054cf89e8b9e03

@melvin-bot melvin-bot bot changed the title “Book a call” option is not there in Concierge. [$250] “Book a call” option is not there in Concierge. Jul 9, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 9, 2024
Copy link

melvin-bot bot commented Jul 9, 2024

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

@mountiny
Copy link
Contributor

mountiny commented Jul 9, 2024

@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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 9, 2024
Copy link

melvin-bot bot commented Jul 9, 2024

📣 @ShridharGoel 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@mountiny
Copy link
Contributor

mountiny commented Jul 9, 2024

Sorry @nkdengineer, ShridharGoel has reported this issue in Slack and got rights for first dibs, not sure how to make this clearly signalled so you would not have to spend your time on this

@nkdengineer
Copy link
Contributor

@mountiny My proposal and @ShridharGoel's proposal are different. Should we wait the C+ member evaluate proposals?

@jayeshmangwani
Copy link
Contributor

Should we wait the C+ member evaluate proposals?

@nkdengineer It looks like @mountiny has already assigned issue to @ShridharGoel 🙂

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 9, 2024
@ShridharGoel
Copy link
Contributor

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

@mountiny This was updated here, and the filtering logic seems to have been missed.

@ShridharGoel
Copy link
Contributor

And this "Book a call" functionality was moved into ProfilePage here.

@jayeshmangwani
Copy link
Contributor

@ShridharGoel @nkdengineer Though a contributor has been selected for the issue, I am curious about what caused the change in the length of the report participants. Previously, it only used to contain the Concierge ID, but now it also includes the user ID.

@mountiny
Copy link
Contributor

mountiny commented Jul 9, 2024

@ShridharGoel can you please link to specific lines causing this issue in the PR you have provided? thanks!

Also yeah curious if we can find what changed the behaviour in how many participants per reports we send

@ShridharGoel
Copy link
Contributor

I am curious about what caused the change in the length of the report participants. Previously, it only used to contain the Concierge ID, but now it also includes the user ID.

@jayeshmangwani I think it used to include both the IDs earlier as well.

@ShridharGoel
Copy link
Contributor

@mountiny

App/src/libs/ReportUtils.ts

Lines 1046 to 1049 in aae4922

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 is the old logic:

App/src/libs/ReportUtils.ts

Lines 1066 to 1071 in 8f9bea9

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

@MitchExpensify MitchExpensify removed the Bug Something is broken. Auto assigns a BugZero manager. label Jul 16, 2024
@MitchExpensify MitchExpensify removed their assignment Jul 16, 2024
@MitchExpensify MitchExpensify added the Bug Something is broken. Auto assigns a BugZero manager. label Jul 16, 2024
Copy link

melvin-bot bot commented Jul 16, 2024

Triggered auto assignment to @JmillsExpensify (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.

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

MitchExpensify commented Jul 16, 2024

Reassigning while I'm on leave 🙇

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 17, 2024
@melvin-bot melvin-bot bot changed the title [$250] “Book a call” option is not there in Concierge. [HOLD for payment 2024-07-24] [$250] “Book a call” option is not there in Concierge. Jul 17, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

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

Copy link

melvin-bot bot commented Jul 17, 2024

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:

Copy link

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

  • [@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:

@jayeshmangwani
Copy link
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 👎

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jul 23, 2024
@JmillsExpensify
Copy link

Payment summary:

@melvin-bot melvin-bot bot removed the Overdue label Jul 26, 2024
@JmillsExpensify
Copy link

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

@jayeshmangwani
Copy link
Contributor

Requested as per #45036 (comment)

@mallenexpensify
Copy link
Contributor

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

@JmillsExpensify
Copy link

$250 approved for @jayeshmangwani

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
None yet
Development

No branches or pull requests

8 participants