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-12-03] [HOLD for payment 2024-11-28] [$125] Workspace - Correct message shown in delete modal after navigating to expensify card #50671

Closed
1 of 6 tasks
lanitochka17 opened this issue Oct 11, 2024 · 50 comments
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 Oct 11, 2024

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: 9.0.48-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Issue found when executing PR #50152

Action Performed:

precondition: user enabled expensify card and logged out

  1. Go to https://staging.new.expensify.com/
    and log in with the account that has expensify card enabled
  2. Navigate to the list of workspaces
  3. Click on the 3 dot > Delete workspace

Expected Result:

The correct message on the delete modal "Are you sure you want to delete this workspace? This will remove all card feeds and assigned cards." is dispalyed

Actual Result:

The correct message on the delete modal is displayed only after the user navigates to the expensify card option and then try deleting the workspace

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
Bug6632067_1728667627196.Recording__856.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021848741708089899190
  • Upwork Job ID: 1848741708089899190
  • Last Price Increase: 2024-10-23
  • Automatic offers:
    • truph01 | Contributor | 104553297
Issue OwnerCurrent Issue Owner: @CortneyOfstad
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 11, 2024
Copy link

melvin-bot bot commented Oct 11, 2024

Triggered auto assignment to @CortneyOfstad (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 lanitochka17 added the DeployBlocker Indicates it should block deploying the API label Oct 11, 2024
@truph01
Copy link
Contributor

truph01 commented Oct 12, 2024

Edited by proposal-police: This proposal was edited at 2024-10-12 00:19:15 UTC.

Proposal

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

  • The correct message on the delete modal is displayed only after the user navigates to the expensify card option and then try deleting the workspace

What is the root cause of that problem?

  • By default, BE does not return card_ and sharedNVP_private_domain_member_ unless we visit expensify card page - OpenPolicyExpensifyCardsPage API is called.

  • In this bug, trying to delete workspace does not show correct message because the card data is not available:

    const hasCardFeedOrExpensifyCard = !isEmptyObject(cardFeeds) || !isEmptyObject(cardsList);

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

  • I believe the backend cannot return all the card_ and sharedNVP_private_domain_member_ data at once. Therefore, I suggest the backend introduces two properties: hasCardList and hasCardFeed, which will be attached along with the policy data.

  • Then, we can use these data in:

const hasCardFeedOrExpensifyCard = !isEmptyObject(cardFeeds) || !isEmptyObject(cardsList);

like:

    const hasCardFeedOrExpensifyCard = !isEmptyObject(cardFeeds) || !isEmptyObject(cardsList) || policy.hasCardList || policy.hasCardFeed;
  • And these data and be used in other places as well.

What alternative solutions did you explore? (Optional)

    const hasCardFeedOrExpensifyCard =
        !isEmptyObject(cardFeeds) ||
        !isEmptyObject(cardsList) ||
        (PolicyUtils.getPolicy(policyIDToDelete)?.areExpensifyCardsEnabled ||
        PolicyUtils.getPolicy(policyIDToDelete)?.areCompanyCardsEnabled) && PolicyUtils.getPolicy(policyIDToDelete)?.workspaceAccountID;

But BE need to make sure they always return these data in policy.

@melvin-bot melvin-bot bot added the Overdue label Oct 14, 2024
@flodnv flodnv removed the DeployBlocker Indicates it should block deploying the API label Oct 14, 2024
@CortneyOfstad
Copy link
Contributor

@lanitochka17 the Actual Result description does not match the steps listed above it. There is no reference to navigating to the "expensify card option" within the steps.

Can you provide some additional context into that?

@melvin-bot melvin-bot bot removed the Overdue label Oct 15, 2024
@CortneyOfstad CortneyOfstad added Needs Reproduction Reproducible steps needed Overdue retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause labels Oct 15, 2024
@CortneyOfstad
Copy link
Contributor

Going to see if QA will retest

@melvin-bot melvin-bot bot removed the Overdue label Oct 15, 2024
@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@CortneyOfstad CortneyOfstad removed the Bug Something is broken. Auto assigns a BugZero manager. label Oct 15, 2024
@CortneyOfstad CortneyOfstad removed their assignment Oct 15, 2024
@CortneyOfstad CortneyOfstad added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 15, 2024
Copy link

melvin-bot bot commented Oct 15, 2024

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

@CortneyOfstad CortneyOfstad self-assigned this Oct 15, 2024
@CortneyOfstad
Copy link
Contributor

Hey @garrettmknight! I am heading OoO this afternoon (10/15 to 10/23), so reassigning this to keep it moving! I had a clarifying question on the reproduction steps here. Did not add to a project yet, as I wanted to be sure it could be actively reproduced 👍

Thanks!

@melvin-bot melvin-bot bot added the Overdue label Oct 18, 2024
Copy link

melvin-bot bot commented Oct 21, 2024

@garrettmknight, @CortneyOfstad Eep! 4 days overdue now. Issues have feelings too...

@garrettmknight garrettmknight removed Needs Reproduction Reproducible steps needed retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause labels Oct 22, 2024
@garrettmknight
Copy link
Contributor

Reproduced, opening up.

@melvin-bot melvin-bot bot removed the Overdue label Oct 22, 2024
@garrettmknight garrettmknight added the External Added to denote the issue can be worked on by a contributor label Oct 22, 2024
@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Nov 21, 2024
@melvin-bot melvin-bot bot changed the title [$125] Workspace - Correct message shown in delete modal after navigating to expensify card [HOLD for payment 2024-11-28] [$125] Workspace - Correct message shown in delete modal after navigating to expensify card Nov 21, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 21, 2024
Copy link

melvin-bot bot commented Nov 21, 2024

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

Copy link

melvin-bot bot commented Nov 21, 2024

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

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

Copy link

melvin-bot bot commented Nov 21, 2024

@Pujan92 @CortneyOfstad @Pujan92 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]

@mountiny
Copy link
Contributor

@CortneyOfstad noting there is a fix still needed to be done as a follow up

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Nov 22, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-11-28] [$125] Workspace - Correct message shown in delete modal after navigating to expensify card [HOLD for payment 2024-12-03] [HOLD for payment 2024-11-28] [$125] Workspace - Correct message shown in delete modal after navigating to expensify card Nov 26, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 26, 2024
Copy link

melvin-bot bot commented Nov 26, 2024

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

Copy link

melvin-bot bot commented Nov 26, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.66-8 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-12-03. 🎊

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

Copy link

melvin-bot bot commented Nov 26, 2024

@Pujan92 @CortneyOfstad @Pujan92 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]

@CortneyOfstad
Copy link
Contributor

Payment is not due until next week so we have a bit of time before the checklist needs to be complete 👍

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Nov 27, 2024
Copy link

melvin-bot bot commented Dec 2, 2024

@CortneyOfstad, @Pujan92, @mountiny, @truph01 Eep! 4 days overdue now. Issues have feelings too...

@CortneyOfstad
Copy link
Contributor

@Pujan92 can you please complete the checklist as linked here ASAP so there is no delay in payment? Thanks!

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 3, 2024

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
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on both staging and production
  • 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: https://github.com/Expensify/App/pull/50152/files#r1868164981

  • [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: N/A

  • [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

  1. Login to an account where expensify card is enabled by user for any of the workspace
  2. Navigate to Settings -> Workspaces
  3. Try to delete that card enabled workspace from 3 dots or from workspace profile page
  4. Verify the correct message displayed on delete modal

Do we agree 👍 or 👎

@CortneyOfstad
Copy link
Contributor

Payment Summary

@Pujan92 — to be paid $250 via NewDot
@truph01 — paid $250 via Upwork

Regression Test

https://github.com/Expensify/Expensify/issues/449958

@garrettmknight
Copy link
Contributor

$250 approved for @Pujan92

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
None yet
Development

No branches or pull requests

9 participants