Open IuliiaHerets opened 2 weeks ago
Triggered auto assignment to @zanyrenney (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.
@zanyrenney z 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
Edited by proposal-police: This proposal was edited at 2024-09-04 19:02:31 UTC.
Workspace - Able to delete expense from archived workspace
We don't check if it is archived in can add or delete transaction here https://github.com/Expensify/App/blob/6760f96d9f7fc425e6972be27e5fb0a277805bd6/src/libs/ReportUtils.ts#L1653-L1657
We should return false if the report is archived one
if (!isMoneyRequestReport(moneyRequestReport)|| isArchivedRoom(moneyRequestReport)) {
return false;
If we don't want to apply it to add transaction too we can apply the check (is not archived check) only for canDeleteTransaction
here
In addition to preventing the deletion in FE we need to also ensure the BE doesn't allow deletion for archived workspace
Note: we don't need to apply the check for shouldShowTaskDeleteButton because we already have it here https://github.com/Expensify/App/blob/6760f96d9f7fc425e6972be27e5fb0a277805bd6/src/pages/ReportDetailsPage.tsx#L198
We see delete report action even when the workspace is archived
The actual bug here is that we see the delete action even when the workspace is archived this is because we do not hide the button when the workspace is archived: https://github.com/Expensify/App/blob/f040cf22a81475354eb352cf808c8ba9acc0de4f/src/pages/ReportDetailsPage.tsx#L201
Update the condition to:
const shouldShowDeleteButton = (shouldShowTaskDeleteButton || canDeleteRequest ) && !isArchivedRoom;
Or update the shouldShowTaskDeleteButton
directly to hide the button by adding the isArchivedRoom
check there
Ooh sorry I totally missed this one!
Reviewing now.
Adding External
Job added to Upwork: https://www.upwork.com/jobs/~021833087706130184523
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (External
)
hey @situchan please review the proposals above and let me know which one is best so we can move ahead here. Thank you!
Triggered auto assignment to @aldo-expensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @FitseTLT 🎉 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 📖
hello! how are we getting along here @FitseTLT @situchan thanks!
cc @aldo-expensify
PR ready
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.29-5 Reproducible in staging?: Y Reproducible in production?: Y Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
User must not be able to delete expense from archived workspace.
Actual Result:
Able to delete expense from archived workspace.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/a5ba6eb5-e126-4ac8-b157-83b1ea8f0549
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @FitseTLT