Open lanitochka17 opened 1 week ago
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.
Edited by proposal-police: This proposal was edited at 2024-10-12 00:19:15 UTC.
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: https://github.com/Expensify/App/blob/e4969b22e7dbb1f6a200cc587ced4ab665415c0e/src/pages/workspace/WorkspacesListPage.tsx#L127
I believe the backend cannot return all the card_ and sharedNVP_private_domainmember 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:
like:
const hasCardFeedOrExpensifyCard = !isEmptyObject(cardFeeds) || !isEmptyObject(cardsList) || policy.hasCardList || policy.hasCardFeed;
And these data and be used in other places as well.
In this: https://github.com/Expensify/App/blob/e4969b22e7dbb1f6a200cc587ced4ab665415c0e/src/pages/workspace/WorkspacesListPage.tsx#L127 we can use:
const hasCardFeedOrExpensifyCard =
!isEmptyObject(cardFeeds) ||
!isEmptyObject(cardsList) ||
PolicyUtils.getPolicy(policyIDToDelete)?.areExpensifyCardsEnabled ||
PolicyUtils.getPolicy(policyIDToDelete)?.areCompanyCardsEnabled;
But BE need to make sure they always return these data in policy.
@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?
Going to see if QA will retest
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
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.
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!
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 https://github.com/Expensify/App/pull/50152
Action Performed:
precondition: user enabled expensify card and logged out
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?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/fb93815d-508c-4c2d-b072-498dcdbf375e
View all open jobs on GitHub