Skip to content

[HOLD for payment 2024-04-15] [$500] Task - Mark as complete button shows up on cancelled task report #37707

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: 1.4.47-0
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: Applause internal team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to chat.
  3. Create a task.
  4. Click on the task.
  5. Click 3-dot menu > Delete > Delete the task.
  6. Go to the cancelled task report from LHN.

Expected Result:

Mark as complete button will not show up on cancelled task report.

Actual Result:

Mark as complete button shows up on cancelled task report. Clicking on the button leads to error.
On mweb, Android and iOS app, the button appears and disappears after opening the cancelled task report.

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

Bug6402230_1709602046041.bandicam_2024-03-05_06-02-11-676__3_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0142a0550498bb0d82
  • Upwork Job ID: 1765856337867956224
  • Last Price Increase: 2024-03-21
  • Automatic offers:
    • situchan | Reviewer | 0
    • dukenv0307 | Contributor | 0

Activity

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

    @melvin-bot

    Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. m-natarajan commented on Mar 5, 2024

    @m-natarajan
    Author

    We think that this bug might be related to #vip-vsb
    cc @quinthar

  4. m-natarajan commented on Mar 5, 2024

    @m-natarajan
    Author

    @Ischurr FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

  5. dukenv0307 commented on Mar 5, 2024

    @dukenv0307
    Contributor

    Proposal

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

    Mark as complete button shows up on cancelled task report. Clicking on the button leads to error.
    On mweb, Android and iOS app, the button appears and disappears after opening the cancelled task report.

    What is the root cause of that problem?

    When we open the task report, OpenReport API is called and BE returns isDeletedParentAction as null.

    Screenshot 2024-03-05 at 10 17 12

    It leads to this check being true in HeaderView

    {isTaskReport && !isSmallScreenWidth && ReportUtils.isOpenTaskReport(props.report) && <TaskHeaderActionButton report={props.report} />}

    isTaskReport(report) && !isCanceledTaskReport(report, parentReportAction) && report?.stateNum === CONST.REPORT.STATE_NUM.OPEN && report?.statusNum === CONST.REPORT.STATUS_NUM.OPEN

    because we don't pass parentReportAction into isOpenTaskReport task report as we

    {ReportUtils.isTaskReport(report) && isSmallScreenWidth && ReportUtils.isOpenTaskReport(report, parentReportAction) && (

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

    1. We should pass parentReportAction from ReportScreen into HeaderView instead of getting it through getParentReportAction because HeaderView will not re-render if parentReportAction is changed.

    const parentReportAction = ReportActionsUtils.getParentReportAction(props.report);

    1. pass props.parentReportAction into isOpenTaskReport here
    {isTaskReport && !isSmallScreenWidth && ReportUtils.isOpenTaskReport(props.report, props.parentReportAction) && <TaskHeaderActionButton report={props.report} />} 
    
    

    {isTaskReport && !isSmallScreenWidth && ReportUtils.isOpenTaskReport(props.report) && <TaskHeaderActionButton report={props.report} />}

    1. We should get all actions of parent report through another withOnyx and then get the parent report action inside the report screen and then we will update the the memo function to only re-render when the current parent report action is changed.

    parentReportAction: {

    What alternative solutions did you explore? (Optional)

    NA

  6. lschurr commented on Mar 5, 2024

    @lschurr
    Contributor
  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 7, 2024
  8. changed the title [-]Task - Mark as complete button shows up on cancelled task report[/-] [+][$500] Task - Mark as complete button shows up on cancelled task report[/+] on Mar 7, 2024
  9. melvin-bot commented on Mar 7, 2024

    @melvin-bot
  10. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 7, 2024
  11. 36 remaining items

  12. dukenv0307 commented on Mar 27, 2024

    @dukenv0307
    Contributor

    @situchan The PR is ready for review.

  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Apr 8, 2024
  14. changed the title [-][$500] Task - Mark as complete button shows up on cancelled task report[/-] [+][HOLD for payment 2024-04-15] [$500] Task - Mark as complete button shows up on cancelled task report[/+] on Apr 8, 2024
  15. melvin-bot commented on Apr 8, 2024

    @melvin-bot

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

  16. melvin-bot commented on Apr 8, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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-04-15. 🎊

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

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

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

    @lschurr
    Contributor

    @dukenv0307 - Do we need a regression test for this one?

  19. lschurr commented on Apr 15, 2024

    @lschurr
    Contributor

    Payment summary:

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