Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.56k stars 2.9k forks source link

Expense - Expense fields are editable after the workspace is deleted #51164

Closed IuliiaHerets closed 3 weeks ago

IuliiaHerets commented 1 month ago

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.51-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/5102033 Email or phone of affected tester (no customers): applausetester+kh081006@applause.expensifail.com Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a workspace.
  3. Submit an expense.
  4. Delete the workspace.
  5. Go to the transaction thread.
  6. Edit any fields.

Expected Result:

The expense fields should be disabled and not be editable after the workspace is deleted.

Actual Result:

The expense fields are not disabled and are editable after the workspace is deleted.

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/4d35a9fa-1fa3-4c9d-a10e-528a5c25888c

View all open jobs on GitHub

melvin-bot[bot] commented 1 month ago

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

IuliiaHerets commented 1 month ago

We think that this bug might be related to #wave-collect - Release 1

IuliiaHerets commented 1 month ago

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

NJ-2020 commented 1 month ago

Edited by proposal-police: This proposal was edited at 2024-10-21 09:46:50 UTC.

Proposal

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

xpense - Expense fields are editable after the workspace is deleted

What is the root cause of that problem?

Inside canEditFieldOfMoneyRequest we don't check if the workspace is archived https://github.com/Expensify/App/blob/8ca4576f77efd6b5312309702feaeb0b49fab17e/src/libs/ReportUtils.ts#L3094

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

We need to check if the report is archived

if (isArchivedRoom(report)) {
    return false;
}

Note: We need some changes on the BE side to return correct private_isArchived value

What alternative solutions did you explore? (Optional)

ChavdaSachin commented 1 month ago

https://github.com/Expensify/App/issues/50352#issuecomment-2398009718 This was my Proposal for exactly similar issue, and I suggested a complete solution where we might be able to completely solve this GH and any similar future issues we might face rather then simple situation based temporary solution.

FitseTLT commented 4 weeks ago

This might be expected as open expense requests are not archived when the workspace is archived. Tagging @trjExpensify for context.

trjExpensify commented 4 weeks ago

The workspace being deleted doesn't mean you can't edit the details of the expenses on the expense report if it's in a state you could edit them prior to deletion. What you shouldn't be able to do is 1) add new expenses to it or 2) submit, approve or pay it. Those restrictions/action buttons are being worked on in another issue though.

muttmuure commented 3 weeks ago

Closing as expected behavior