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-08-14] [$250] Task – RHP present when delete task with reply #45699

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 18, 2024 · 29 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

@lanitochka17
Copy link

lanitochka17 commented Jul 18, 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.9-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4735083
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in
  3. Open any chat
  4. Create a task
  5. Open task detail
  6. Send comment
  7. Click on header and delete the task

Expected Result:

RHP disappears when delete task with reply (see this comment)

Actual Result:

RHP present when delete task with reply, but disappears when delete IOU with reply

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

Bug6546285_1721315050981.Delete_task.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d58ba540e5cc55b0
  • Upwork Job ID: 1814135208916800159
  • Last Price Increase: 2024-07-19
  • Automatic offers:
    • abdulrahuman5196 | Reviewer | 103251909
    • dominictb | Contributor | 103251910
Issue OwnerCurrent Issue Owner: @jliexpensify
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 18, 2024
Copy link

melvin-bot bot commented Jul 18, 2024

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@lanitochka17
Copy link
Author

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

@FitseTLT
Copy link
Contributor

Proposal

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

Task – RHP present when delete task with reply

What is the root cause of that problem?

We are only navigating back if there are no visible actions !ReportActionsUtils.doesReportHaveVisibleActions

App/src/libs/actions/Task.ts

Lines 1058 to 1060 in 7ba66a1

if (shouldDeleteTaskReport) {
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(parentReport?.reportID ?? '-1'));
}

const shouldDeleteTaskReport = !ReportActionsUtils.doesReportHaveVisibleActions(report.reportID ?? '-1');
const optimisticReportAction: Partial<ReportUtils.OptimisticTaskReportAction> = {

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

We should dismiss modal in when the task has visible actions so change it to

if (shouldDeleteTaskReport) {
        Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(parentReport?.reportID ?? '-1'));
    } else {
        Navigation.dismissModal();
    }

What alternative solutions did you explore? (Optional)

remove the if here if we want to navigate back to the parent

if (shouldDeleteTaskReport) {

@dominictb
Copy link
Contributor

dominictb commented Jul 18, 2024

Proposal

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

  • RHP present when delete task with reply, but disappears when delete IOU with reply

What is the root cause of that problem?

  • When deleting a task, we call:

    Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(parentReport?.reportID ?? '-1'));

    if the below value is true:
    const shouldDeleteTaskReport = !ReportActionsUtils.doesReportHaveVisibleActions(report.reportID ?? '-1');

  • In our case, shouldDeleteTaskReport is false so it does not do any navigation action.

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

        return ROUTES.REPORT_WITH_ID.getRoute(parentReport?.reportID ?? '-1');
            navigateBackToAfterDelete.current = Task.deleteTask(report);
                            if (caseID === CASES.DEFAULT) {
                                if (navigateBackToAfterDelete.current) {
                                    Navigation.goBack(navigateBackToAfterDelete.current);
                                } else {
                                    Navigation.dismissModal();
                                }
                            }
                            return;
  • Explanation: Generally, In step (1) we use the same approach as the delete expense flow to avoid the bug. In steps (2) and (3), we call Navigation.goback(...) if Task.deleteTask(report) return the defined value, otherwise, we call Navigation.dismissModal().

What alternative solutions did you explore? (Optional)

NA

@jliexpensify
Copy link
Contributor

@lanitochka17 to confirm, are you expecting the RIght Hand Pane (RHP) to show when an expense is deleted? i.e. to mirror the Task?

@dominictb
Copy link
Contributor

@jliexpensify FYI, we have decided to close the RHP in here

@jliexpensify
Copy link
Contributor

Thanks @dominictb - yeah that's the behaviour I'm seeing when testing this, so I don't think this is a bug. Closing!

@dominictb
Copy link
Contributor

@jliexpensify I think it is a bug because when deleting expenses, we close RHP, but not when deleting tasks. It is inconsistency

@jliexpensify
Copy link
Contributor

Oh, I see - I misunderstood you! So you're saying the decision was made by Shawn that the RHP shouldn't exist when a task or/and an expense is deleted?

@jliexpensify jliexpensify reopened this Jul 19, 2024
@dominictb
Copy link
Contributor

@jliexpensify Yes

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Jul 19, 2024
Copy link

melvin-bot bot commented Jul 19, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01d58ba540e5cc55b0

@melvin-bot melvin-bot bot changed the title Task – RHP present when delete task with reply [$250] Task – RHP present when delete task with reply Jul 19, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 19, 2024
Copy link

melvin-bot bot commented Jul 19, 2024

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

@jliexpensify
Copy link
Contributor

Thanks for clearing this up @dominictb - in that case, I agree: it's a bug

Copy link

melvin-bot bot commented Jul 22, 2024

@jliexpensify, @abdulrahuman5196 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 Jul 22, 2024
@jliexpensify
Copy link
Contributor

bump @abdulrahuman5196 we have a proposal

@abdulrahuman5196
Copy link
Contributor

Hi, Will check on this tomorrow

@melvin-bot melvin-bot bot removed the Overdue label Jul 23, 2024
@abdulrahuman5196
Copy link
Contributor

Checking now

@abdulrahuman5196
Copy link
Contributor

abdulrahuman5196 commented Jul 24, 2024

@dominictb 's proposal here looks good and works well. It is inline with the current expense deletion flow.
But one suggestion to instead of doing step 3 in the mentioned place, we can add another if statement to differentiate task deletion like done here, anyways that could be handled in the PR.

if (caseID === CASES.DEFAULT) {
Task.deleteTask(report);
navigateBackToAfterDelete.current = undefined;
return;

🎀 👀 🎀
C+ Reviewed

Copy link

melvin-bot bot commented Jul 24, 2024

Triggered auto assignment to @thienlnam, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

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

melvin-bot bot commented Jul 24, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Jul 24, 2024

📣 @dominictb 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 26, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 7, 2024
@melvin-bot melvin-bot bot changed the title [$250] Task – RHP present when delete task with reply [HOLD for payment 2024-08-14] [$250] Task – RHP present when delete task with reply Aug 7, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

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

Copy link

melvin-bot bot commented Aug 7, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.17-2 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-08-14. 🎊

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

Copy link

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

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

@jliexpensify
Copy link
Contributor

jliexpensify commented Aug 14, 2024

Bump @abdulrahuman5196 for the checklist

Payment Summary

Upwork job

@abdulrahuman5196
Copy link
Contributor

The PR that introduced the bug has been identified. Link to the PR:
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:
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:

Doesn't seem to be a regression

Determine if we should create a regression test for this bug.

Yes.

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.

  1. Go to NewDot
  2. Open any chat
  3. Create a task
  4. Open task detail
  5. Send comment
  6. Click on header and delete the task
  7. Verify that: RHP disappears when delete task with reply

@jliexpensify I am getting paid via newDot.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 14, 2024
@JmillsExpensify
Copy link

$250 approved for @abdulrahuman5196

@jliexpensify
Copy link
Contributor

Paid and job closed.

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
No open projects
Archived in project
Development

No branches or pull requests

7 participants