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-06-20] [HOLD for payment 2024-06-18] [$250] [Guided Setup Stage 2] "Meet your specialist" setup task not using proper Guide's calendar link #41522

Closed
6 tasks done
francoisl opened this issue May 2, 2024 · 46 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Weekly KSv2

Comments

@francoisl
Copy link
Contributor

francoisl commented May 2, 2024

Version Number: N/A (v1.4.70-0)
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers): Any new account
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @francoisl
Slack conversation:

Action Performed:

  1. Create a new account
  2. During the onboarding flow, pick the option "manage my team's expenses"
  3. After completing the onboarding modal steps, open the task "Meet your setup specialist"
  4. Look at the "schedule a call" link

Expected Result:
The link should point to the assigned guide's calendly link.

As discussed in this thread, we need to remove the guide link from the message if not present at the time of flow completion.

If the guide link is present in NewDot in time, no changes to the current flow.

If not, the message will omit the link and as the task is created in the backend, we need to recreate the message correctly with the link. This is the internal task in this case

Actual Result:

The link points to the fallback new.expensify.com value, despite having a value in Onyx

guideCalendarLink: guideCalendarLink ?? CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL,

327536868-2941f2bf-ce8d-4b7f-baff-81d96c8d2cce

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Issue OwnerCurrent Issue Owner: @Christinadobrzyn
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018008e7f232e1b5aa
  • Upwork Job ID: 1788750602254168064
  • Last Price Increase: 2024-05-10
@francoisl francoisl added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

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

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label May 2, 2024
@trjExpensify trjExpensify moved this to Release 1: Spring 2024 (May) in [#whatsnext] #wave-collect May 2, 2024
@melvin-bot melvin-bot bot changed the title [Guided Setup Stage 2] "Meet your specialist" setup task not using proper Guide's calendar link [$250] [Guided Setup Stage 2] "Meet your specialist" setup task not using proper Guide's calendar link May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01082698f3bc5a219c

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

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

@trjExpensify
Copy link
Contributor

No idea why Melvin did that, will look at it here.

image

I've tried to restore Franc's wonderful words in the OP!

@ShridharGoel
Copy link
Contributor

Proposal

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

"Meet your specialist" setup task not using proper Guide's calendar link

What is the root cause of that problem?

guideCalendarLink will be undefined if the task's data got created before we get the guidesCalendarLink from backend.

let guideCalendarLink: string | undefined;
Onyx.connect({
key: ONYXKEYS.ACCOUNT,
callback: (value) => {
guideCalendarLink = value?.guideCalendarLink ?? undefined;
},
});

App/src/libs/actions/Report.ts

Lines 3051 to 3057 in 7636b01

const taskDescription =
typeof task.description === 'function'
? task.description({
adminsRoomLink: `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.REPORT_WITH_ID.getRoute(adminsChatReportID ?? '')}`,
guideCalendarLink: guideCalendarLink ?? CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL,
})
: task.description;

This will take the link only if it is already available, else new.expensify.com will be used.

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

If guideCalendarLink is undefined while creating the task description, we should add it as an empty string while creating the optimistic data.

Then, backend can check if the link for "schedule a call" is empty in the description. If yes, then backend will add the guide's calendar link and send it in the task description.

App side change will be to change the fallback to '':

typeof task.description === 'function'
                ? task.description({
                      adminsRoomLink: `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.REPORT_WITH_ID.getRoute(adminsChatReportID ?? '')}`,
                      guideCalendarLink: guideCalendarLink ?? '',
                  })
                : task.description;

@Christinadobrzyn
Copy link
Contributor

@rayane-djouah can you check out the above proposal when you have a moment? TY!

@rayane-djouah
Copy link
Contributor

rayane-djouah commented May 3, 2024

Thank you for the proposal @ShridharGoel, I agree that this is a backend bug.

The bug cause is that we build task description data in completeOnboarding function before the CreateWorkspace API request is finished, which returns the guideCalendarLink in the response.

But, changing the fallback to '' will break the link markdown. I think we should keep using NEW_EXPENSIFY_URL as a fallback and BE should handle that.

I think that the backend should return the updated task description with the guide calendar link in completeOnboarding response.

cc @mountiny

const {adminsChatReportID} = Policy.createWorkspace(undefined, true, work);
Report.completeOnboarding(
onboardingPurposeSelected,
CONST.ONBOARDING_MESSAGES[onboardingPurposeSelected],
{
login: currentUserPersonalDetails.login ?? '',
firstName: currentUserPersonalDetails.firstName ?? '',
lastName: currentUserPersonalDetails.lastName ?? '',
},
adminsChatReportID,
);

App/src/libs/actions/Report.ts

Lines 3094 to 3101 in 0f39e43

const tasksData = data.tasks.map((task, index) => {
const taskDescription =
typeof task.description === 'function'
? task.description({
adminsRoomLink: `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.REPORT_WITH_ID.getRoute(adminsChatReportID ?? '')}`,
guideCalendarLink: guideCalendarLink ?? CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL,
})
: task.description;

@ShridharGoel
Copy link
Contributor

Then should we update the fallback to concierge chat? Concierge can provide the specialist link if user sends a message.

@trjExpensify
Copy link
Contributor

Discussing next steps in this thread.

Copy link

melvin-bot bot commented May 7, 2024

@Christinadobrzyn, @rayane-djouah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label May 7, 2024
@Christinadobrzyn
Copy link
Contributor

Just checking in here @rayane-djouah do you have everything you need to plan the next steps for this? Do you need anything from the team on what this should look like/how this should behave?

@melvin-bot melvin-bot bot removed the Overdue label May 7, 2024
@rayane-djouah
Copy link
Contributor

This bug may be fixed as part of this: #41589. I will retest today.

@Christinadobrzyn Christinadobrzyn changed the title [$250] [Guided Setup Stage 2] "Meet your specialist" setup task not using proper Guide's calendar link [HOLD 41589] [$250] [Guided Setup Stage 2] "Meet your specialist" setup task not using proper Guide's calendar link May 8, 2024
@Christinadobrzyn
Copy link
Contributor

Awesome thank you @rayane-djouah - I'll add a HOLD for #41589 while we retest

@Christinadobrzyn
Copy link
Contributor

looks like this isn't fixed

2024-05-09_13-47-13.mp4

Monitoring - #41589

@rayane-djouah
Copy link
Contributor

The bug didn't get fixed by #41589 and it is still reproducible. I think we should make this issue internal as it requires backend changes

@Christinadobrzyn Christinadobrzyn added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor labels May 10, 2024
Copy link

melvin-bot bot commented May 10, 2024

Job added to Upwork: https://www.upwork.com/jobs/~018008e7f232e1b5aa

Copy link

melvin-bot bot commented Jun 3, 2024

@Christinadobrzyn, @rayane-djouah Huh... This is 4 days overdue. Who can take care of this?

@Christinadobrzyn
Copy link
Contributor

This is on @mountiny's radar so we'll keep this as is for now. Let me know if you'd prefer I seek another volunteer @mountiny!

@melvin-bot melvin-bot bot removed the Overdue label Jun 4, 2024
@mountiny mountiny self-assigned this Jun 4, 2024
@mountiny mountiny removed the Hot Pick Ready for an engineer to pick up and run with label Jun 4, 2024
@rayane-djouah
Copy link
Contributor

unassigning myself as this is internal

@rayane-djouah rayane-djouah removed their assignment Jun 5, 2024
@Christinadobrzyn
Copy link
Contributor

Ah good reminder @rayane-djouah - don't we need a C+ on this?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jun 6, 2024
@mountiny
Copy link
Contributor

PR is in its final stretch now

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 11, 2024
@melvin-bot melvin-bot bot changed the title [$250] [Guided Setup Stage 2] "Meet your specialist" setup task not using proper Guide's calendar link [HOLD for payment 2024-06-18] [$250] [Guided Setup Stage 2] "Meet your specialist" setup task not using proper Guide's calendar link Jun 11, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

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

Copy link

melvin-bot bot commented Jun 11, 2024

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

Copy link

melvin-bot bot commented Jun 11, 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:

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

@Christinadobrzyn
Copy link
Contributor

Just a heads up - I'm going to be ooo until June 24th.

@mountiny Are there any contributors that need to be paid for this? Doesn't look like it?

@mountiny
Copy link
Contributor

Yeah I think we can close this now

@github-project-automation github-project-automation bot moved this from Release 1.5: XeroCon 2024 (June 12th) to Done in [#whatsnext] #wave-collect Jun 12, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jun 13, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-06-18] [$250] [Guided Setup Stage 2] "Meet your specialist" setup task not using proper Guide's calendar link [HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] [Guided Setup Stage 2] "Meet your specialist" setup task not using proper Guide's calendar link Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-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 2024-06-20. 🎊

Copy link

melvin-bot bot commented Jun 13, 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:

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

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. Internal Requires API changes or must be handled by Expensify staff Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants