twenty/packages/twenty-server
gitstart-app[bot] 6caa78008f
If an object is disabled, then the relationships to that object should be disabled (#6690)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-5370](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-5370).
This ticket was imported from:
[TWNTY-5370](https://github.com/twentyhq/twenty/issues/5370)

 --- 


### Description

- We updated the logic in
packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.service.ts
  
  Test cases:
1. Ensure that when an object is disabled, all related relationships are
also disabled.
         a. Example disable the people object
b. Check the company object and verify that the people field has been
disabled too
c. Check the opportunity object and check that the point of contact
field has been disabled too
2. Verify that when a previously disabled object is restored, the
relationships are also restored.
3. Ensure that previously disabled relationships remain disabled when
the object is disabled and later restored.
4. Verify that relationships of a disabled object are not visible in the
UI.
5. Ensure that relationships to a disabled object are marked as inactive
in the data models screen

 ### Refs

#5370

  
### Demo
  

<https://www.loom.com/share/2b0a91f463ca4e02a6963f9a8796a0d9?sid=1e9c4fb8-8fb9-4c6c-b43a-c50f3776e1d3>

Fixes #5370

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
2024-08-21 11:19:21 +02:00
..
@types Improve performance twenty orm (#6691) 2024-08-20 19:42:02 +02:00
patches Improve performance twenty orm (#6691) 2024-08-20 19:42:02 +02:00
scripts Update render deploy configuration (#6167) 2024-07-09 00:27:07 +02:00
src If an object is disabled, then the relationships to that object should be disabled (#6690) 2024-08-21 11:19:21 +02:00
test Deprecate address standard field (#6087) 2024-07-10 18:07:18 +02:00
.env.example 6181 workflows create a custom code executor (#6235) 2024-07-17 17:53:01 +02:00
.env.test Rename mutation maximum affected records (#6042) 2024-06-26 18:00:25 +02:00
.eslintrc.cjs feat: add eslint rule for enforcing WorkspaceService naming convention (#6308) 2024-07-19 19:17:57 +02:00
.gitignore feat: workspace:health nullable fix (#3882) 2024-02-08 18:22:29 +01:00
.prettierignore Migrate to a monorepo structure (#2909) 2023-12-10 18:10:54 +01:00
.prettierrc Migrate to a monorepo structure (#2909) 2023-12-10 18:10:54 +01:00
.swcrc feat: twenty orm for standard and custom objects (#6178) 2024-07-19 18:23:52 +02:00
jest.config.ts 4840 multi workspace update user userworkspace inconsistent on delete set null constraint (#5373) 2024-05-13 14:50:27 +02:00
nest-cli.json chore: use Nx affected tasks in CI (#5110) 2024-04-30 16:28:25 +02:00
package.json feat: soft delete (#6576) 2024-08-16 21:20:02 +02:00
project.json Leverage workspace activationStatus to decide if a workspace is activated or not (#6497) 2024-08-01 17:05:15 +02:00
tsconfig.build.json chore: set up twenty-emails config so build isn't needed in development (#3619) 2024-01-29 06:17:12 -03:00
tsconfig.json feat: twenty orm for standard and custom objects (#6178) 2024-07-19 18:23:52 +02:00