Skip to content

[HOLD for payment 2023-10-09] [Awaiting payment Oct 2 2023 / $500] Web - green dot appears even if task is deleted #27805

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to any chat
  2. Click on + icon and select assign task
  3. Enter title and assign task to you
  4. Create task
  5. Go to task thread and delete the task

Expected Result:

should not show green dot show if task is deleted

Actual Result:

green dot appears even if task is deleted

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: Dev 1.3.71-5
Reproducible in staging?: Y
Reproducible in production?: n
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
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-09-19.at.12.19.29.PM.mov

Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695106297939429

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01833b320ff7bd97a7
  • Upwork Job ID: 1704197379523981312
  • Last Price Increase: 2023-09-19
  • Automatic offers:
    • paultsimura | Contributor | 26790441
    • gadhiyamanan | Reporter | 26790444

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 19, 2023
  2. changed the title [-]Dev: Web - green dot appears even if task is deleted[/-] [+][$500] Dev: Web - green dot appears even if task is deleted[/+] on Sep 19, 2023
  3. melvin-bot commented on Sep 19, 2023

    @melvin-bot
  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 19, 2023
  5. melvin-bot commented on Sep 19, 2023

    @melvin-bot

    Triggered auto assignment to @michaelhaxhiu (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

  6. melvin-bot commented on Sep 19, 2023

    @melvin-bot

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

  7. paultsimura commented on Sep 19, 2023

    @paultsimura
    Contributor

    Proposal

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

    The green dot is displayed in LHN for deleted task

    What is the root cause of that problem?

    Here we check for the optionItem.isArchivedRoom to check if the task is closed. The archival logic was removed now.

    const shouldShowGreenDotIndicator =
    !hasBrickError &&
    (optionItem.isUnreadWithMention ||
    ReportUtils.isWaitingForIOUActionFromCurrentUser(optionItem) ||
    (optionItem.isTaskReport && optionItem.isTaskAssignee && !optionItem.isCompletedTaskReport && !optionItem.isArchivedRoom));

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

    We need to check for optionItem.isOpenTaskReport instead:

        const shouldShowGreenDotIndicator =
            !hasBrickError &&
            (optionItem.isUnreadWithMention ||
                ReportUtils.isWaitingForIOUActionFromCurrentUser(optionItem) ||
    -           (optionItem.isTaskReport && optionItem.isTaskAssignee && !optionItem.isCompletedTaskReport && !optionItem.isArchivedRoom))
    +           (optionItem.isOpenTaskReport && optionItem.isTaskAssignee));

    Add in SidebarUtils:

        if (result.isTaskReport) {
    +       result.isOpenTaskReport = ReportUtils.isOpenTaskReport(report);
    -       result.isCompletedTaskReport = ReportUtils.isCompletedTaskReport(report);
            result.isTaskAssignee = ReportUtils.isReportManager(report);
        }

    if (result.isTaskReport) {
    result.isCompletedTaskReport = ReportUtils.isCompletedTaskReport(report);
    result.isTaskAssignee = ReportUtils.isReportManager(report);
    }

    Result:

    https://www.loom.com/share/4e2f44055ded410ea5dfe9bef3368db8?sid=1c7304e3-39be-47b6-8685-2b6bd517ce21

    What alternative solutions did you explore? (Optional)

  8. abzokhattab commented on Sep 19, 2023

    @abzokhattab
    Contributor

    Proposal

    The green dot is displayed in LHN for deleted task

    What is the root cause of that problem?

    we are not checking if the task is canceled in the green flag assignment

    const shouldShowGreenDotIndicator =
    !hasBrickError &&
    (optionItem.isUnreadWithMention ||
    ReportUtils.isWaitingForIOUActionFromCurrentUser(optionItem) ||
    (optionItem.isTaskReport && optionItem.isTaskAssignee && !optionItem.isCompletedTaskReport && !optionItem.isArchivedRoom));

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

    we should check if the task is not cancelled as well

        const shouldShowGreenDotIndicator =
            !hasBrickError &&
            (optionItem.isUnreadWithMention ||
                ReportUtils.isWaitingForIOUActionFromCurrentUser(optionItem) ||
                (optionItem.isTaskReport && optionItem.isTaskAssignee && !optionItem.isCompletedTaskReport && !optionItem.isCanceledTaskReport && !optionItem.isArchivedRoom));

    and of course add the isCanceledTaskReport object to the SideBarUtils.js in line 268 to enable the OptionRowLHN to access it

        if (result.isTaskReport) {
            result.isCompletedTaskReport = ReportUtils.isCompletedTaskReport(report);
            result.isCanceledTaskReport = ReportUtils.isCanceledTaskReport(report);
            result.isTaskAssignee = ReportUtils.isReportManager(report);
        }

    POC:

    image
  9. rojiphil commented on Sep 20, 2023

    @rojiphil
    Contributor

    Not able to reproduce in latest main - v1.3.71-11

  10. paultsimura commented on Sep 20, 2023

    @paultsimura
    Contributor

    Still reproducible on 1.3.71-13

    image
  11. rojiphil commented on Sep 20, 2023

    @rojiphil
    Contributor

    Oops! Sorry @paultsimura. I can also reproduce it. Thanks for the verification.

  12. melvin-bot commented on Sep 21, 2023

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  13. 35 remaining items

  14. michaelhaxhiu commented on Sep 27, 2023

    @michaelhaxhiu
    Contributor

    I'm handing this off to another BZ as I'm going on sabbatical by end of week, and want to ensure this is paid.

    Next steps are as follows:

  15. flaviadefaria commented on Oct 2, 2023

    @flaviadefaria
    Contributor

    @paultsimura you've been paid
    @gadhiyamanan please accept the offer so that I can pay you.

  16. gadhiyamanan commented on Oct 2, 2023

    @gadhiyamanan
    Contributor

    @flaviadefaria offer accepted, thanks!

  17. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Oct 2, 2023
  18. changed the title [-][Awaiting payment Oct 2 2023 / $500] Web - green dot appears even if task is deleted[/-] [+][HOLD for payment 2023-10-09] [Awaiting payment Oct 2 2023 / $500] Web - green dot appears even if task is deleted[/+] on Oct 2, 2023
  19. melvin-bot commented on Oct 2, 2023

    @melvin-bot

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

  20. melvin-bot commented on Oct 2, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.75-12 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 2023-10-09. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

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

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  21. melvin-bot commented on Oct 2, 2023

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

    • [@allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
    • [@allroundexperts] 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:
    • [@allroundexperts] 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:
    • [@allroundexperts] Determine if we should create a regression test for this bug.
    • [@allroundexperts] 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.
    • [@flaviadefaria] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/322364
  22. allroundexperts commented on Oct 3, 2023

    @allroundexperts
    Contributor

    Reviewer Checklist

    1. Show green dot for uncompleted tasks assigned to current user #20808
    2. https://github.com/Expensify/App/pull/20808/files#r1343276213
    3. I think a Slack discussion is not needed since this could have been caught only by better testing.
    4. Regression test would be helpful here.

    Regression Test Steps

    1. Go to any chat and create task and assign it to yourself.
    2. Go to the created task and cancel it.

    Verify that a green dot does not show up in the LHN beside the task item.

    Do we 👍 or 👎 ?

  23. JmillsExpensify commented on Oct 5, 2023

    @JmillsExpensify
    Contributor

    $750 payment approved for @allroundexperts based on BZ summary.

  24. flaviadefaria commented on Oct 9, 2023

    @flaviadefaria
    Contributor

    Alright, I believe everyone has been paid so closing this.

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.EngineeringExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions