Skip to content

[Due for payment 2025-06-05] [$250] Onboarding Task - After take a tour in mweb, on app the take a 2-minute tour is not finished #60402

Closed

Description

@jponikarchuk

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: v9.1.29-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: #60158
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: iPhone 11 Pro/ iOS 17.6.1
App Component: Other

Action Performed:

  1. Open app
  2. Create a new account and choose manage my expense flow
  3. Select manage team flow
  4. Click Reports
  5. Click Take a tour
  6. Finish the tour on web then click Return to app

Expected Result:

Redirect to app and the Take a 2-miunute tour task should be completed

Actual Result:

Redirect to app and the Take a 2-miunute tour task is not completed

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021913033064562816058
  • Upwork Job ID: 1913033064562816058
  • Last Price Increase: 2025-05-02
  • Automatic offers:
    • FitseTLT | Contributor | 107204820
Issue OwnerCurrent Issue Owner: @bfitzexpensify

Activity

  1. added
    Bug
    Daily
    on Apr 17, 2025
  2. melvin-bot commented on Apr 17, 2025

    @melvin-bot

    Triggered auto assignment to @stephanieelliott (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. bernhardoj commented on Apr 17, 2025

    @bernhardoj
    Contributor

    Proposal

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

    The tour task isn't marked as complete.

    What is the root cause of that problem?

    When we press the take tour button, we check if the user can modify and complete the task before completing it.

    buttonAction: () => {
    openExternalLink(navatticURL);
    setSelfTourViewed();
    if (viewTourTaskReport && canModifyTheTask && canActionTheTask) {
    completeTask(viewTourTaskReport);
    }

    However, we can't modify it since we don't own (create) create the task. After completing the tour, we are redirected back to concierge. If the route has navattic params with a value of completed, it will mark the task as complete.

    // Mark the viewTourTask as complete if we are redirected to Concierge after finishing the Navattic tour
    const {navattic} = (route.params as {navattic?: string}) ?? {};
    if (navattic === CONST.NAVATTIC.COMPLETED) {
    if (viewTourTaskReport) {
    if (viewTourTaskReport.stateNum !== CONST.REPORT.STATE_NUM.APPROVED || viewTourTaskReport.statusNum !== CONST.REPORT.STATUS_NUM.APPROVED) {
    completeTask(viewTourTaskReport);
    }
    }
    }

    However, if access the tour page from mobile and we use the Return to Expensify, it won't include the navattic params, but if we access it from the desktop, the params exist.

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

    So, we have the code to complete the task in 2 places, when pressing the button (which never works) and when redirected back to the concierge with navattic params.

    If we want to complete the task as soon as the user presses the button, then we can remove the canModifyTask condition, or we can follow the condition on the concierge page. If we only want to complete the task after being redirected to concierge page with navattic param, then the internal team needs to fix it. We can also removes the unused complete task when pressing the button.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

  4. FitseTLT commented on Apr 17, 2025

    @FitseTLT
    Contributor

    Proposal

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

    Onboarding Task - After take a tour in mweb, on app the take a 2-minute tour is not finished

    What is the root cause of that problem?

    The 2-minute tour task should be completed as soon as pressing the 2-minute tour menu but the task is not getting completed on pressing take-2-minute tour because canModifyTheTask will be false
    here

    buttonAction: () => {
    openExternalLink(navatticURL);
    setSelfTourViewed();
    if (viewTourTaskReport && canModifyTheTask && canActionTheTask) {
    completeTask(viewTourTaskReport);
    }

    as the current user is not the owner

    App/src/libs/actions/Task.ts

    Lines 1224 to 1225 in 717b77a

    if (ownerAccountID !== sessionAccountID) {
    return false;

    Originally the task used to complete on pressing the take 2 minute tour but there was a problem where completing the task with an archived onboarding policy returned an error from BE so we fixed it here by checking if the user canModifyTheTask && canActionTheTask before completing the task and it used to work well. But another PR changed the logic of modifying tasks to only allow editing tasks (like description title etc) to the creator of the task to disallow non-creator assignees from editing the task title description etc... So canModifyTask was updated to return false for non-creators of the task. So the PR removed canModifyTask conditions from determining if a user can complete a task so that only canActionTask is used to determine the condition if a user is allowed to complete a task. But they forgot to apply this change (of removing canModifyTask) for some cases including our 2 minute tour case.

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

    We should remove canModifyTask conditions in determining if a user can complete(set as incomplete) a task. We should remove canModifyTask condition for 2-minute tour here here here

    Additionally remove the conditions here

    if (isCompletedTaskReport(report) && canModifyTask && canActionTask) {

    which will be consistent with what we use here ( The current behavior is we don't see the mark as incomplete button in ReportDetailsPage for the non-creator of the task but the user can still uncheck the complete task check box which is unexpected behavior)


    As a side note: BTW regarding the mark as incomplete button in header view we are now allowing TaskHeaderActionButton only for isOpenTaskReport

    {!!report && shouldUseNarrowLayout && isOpenTaskReport(report, parentReportAction) && (

    App/src/libs/ReportUtils.ts

    Lines 1318 to 1322 in 717b77a

    function isOpenTaskReport(report: OnyxInputOrEntry<Report>, parentReportAction: OnyxInputOrEntry<ReportAction> = null): boolean {
    return (
    isTaskReport(report) && !isCanceledTaskReport(report, parentReportAction) && report?.stateNum === CONST.REPORT.STATE_NUM.OPEN && report?.statusNum === CONST.REPORT.STATUS_NUM.OPEN
    );
    }

    but the mark as in complete button can only show for complete task but completed task will not have status of open so we should either remove the mark as incomplete button logic in TaskHeaderActionButton because it is now dead code or if we want to show the button we should display the TaskHeaderActionButton if the task report is not a canceled one isTaskReport(report) && !isCanceledTaskReport(report, parentReportAction) whether or not the status is open. And I think this what we want as it was the expected behavior originally here


    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N / A

    What alternative solutions did you explore? (Optional)

  5. added
    External
    on Apr 18, 2025
  6. changed the title [-]Onboarding Task - After take a tour in mweb, on app the take a 2-minute tour is not finished[/-] [+][$250] Onboarding Task - After take a tour in mweb, on app the take a 2-minute tour is not finished[/+] on Apr 18, 2025
  7. melvin-bot commented on Apr 18, 2025

    @melvin-bot
  8. added
    Help Wanted
    on Apr 18, 2025
  9. melvin-bot commented on Apr 18, 2025

    @melvin-bot

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

  10. parasharrajat commented on Apr 18, 2025

    @parasharrajat
    Member

    Thanks for the proposals. I will look back into the mentioned issues and give my review.

  11. parasharrajat commented on Apr 20, 2025

    @parasharrajat
    Member

    @FitseTLT can you please reword your explanations? I'm having a hard time understanding it.

  12. melvin-bot commented on Apr 24, 2025

    @melvin-bot

    @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  13. 47 remaining items

  14. added
    Weekly
    Awaiting Payment
    on May 29, 2025
  15. changed the title [-][$250] Onboarding Task - After take a tour in mweb, on app the take a 2-minute tour is not finished[/-] [+][Due for payment 2025-06-05] [$250] Onboarding Task - After take a tour in mweb, on app the take a 2-minute tour is not finished[/+] on May 29, 2025
  16. removed
    Reviewing
    on May 29, 2025
  17. melvin-bot commented on May 29, 2025

    @melvin-bot

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

  18. melvin-bot commented on May 29, 2025

    @melvin-bot

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

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

  19. melvin-bot commented on May 29, 2025

    @melvin-bot

    @parasharrajat @bfitzexpensify @parasharrajat The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  20. parasharrajat commented on May 29, 2025

    @parasharrajat
    Member

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: fix: Make all task titles/descriptions read-only to all but the author/assignee. #53749 (comment)

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: Not needed

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Test:

    1. Create a new account and choose manage my expense flow
    2. Select manage team flow
    3. Click Reports
    4. Click Take a test drive
    5. Redirect to app and the Take a test-Drive task should be completed
    6. As User A create a task and assign User B
    7. As user B complete the task
    8. Click on the task report header to open report details page
    9. Verify Mark as incomplete button exists as User B on report details page.

    Do we agree 👍 or 👎

  21. added
    Daily
    and removed
    Weekly
    on Jun 5, 2025
  22. bfitzexpensify commented on Jun 6, 2025

    @bfitzexpensify
    Contributor

    Payment summary:

    @FitseTLT due $250 - paid via Upwork ✅
    @parasharrajat due $250 via ND manual request

  23. parasharrajat commented on Jun 27, 2025

    @parasharrajat
    Member

    Payment requested as per #60402 (comment)

  24. JmillsExpensify commented on Jul 9, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @parasharrajat

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions