Tags: sharpenteeth/twenty
Tags
fix: show save button when creating a new role (twentyhq#17163) ## Summary Fixes a regression where the save button was not visible when creating a new role. ## Root Cause PR twentyhq#17062 (RLS FE implementation) introduced a change to the `isDirty` logic that added `isDefined(settingsPersistedRole)` as a condition: ```typescript const isDirty = isDefined(settingsPersistedRole) && !isDeeplyEqual(settingsDraftRole, settingsPersistedRole); ``` However, in create mode, `settingsPersistedRole` is intentionally set to `undefined` (in `SettingsRoleCreateEffect.tsx`), causing `isDirty` to always evaluate to `false` and hiding the save button. ## Fix Added `isCreateMode` to the `isDirty` condition so the save button shows when creating a new role: ```typescript const isDirty = isCreateMode || (isDefined(settingsPersistedRole) && !isDeeplyEqual(settingsDraftRole, settingsPersistedRole)); ``` cc @Weiko <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Restores save button visibility when creating a role. > > - Simplifies `isDirty` to `!isDeeplyEqual(settingsDraftRole, settingsPersistedRole)`, removing the `isDefined(settingsPersistedRole)` check so create-mode is considered dirty. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 21593d5. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Weiko <corentin@twenty.com>
Filter valid fields in record steps (twentyhq#17145) Fixes twentyhq#16775 When a field is deleted from the model, the workflow action step still stores the deleted field name in `step.settings.input.objectRecord`. We need to filter out the fields that are not valid anymore. This logic existed before but had been removed with the migration to tool services.
Fix workspace application fk command re-run (twentyhq#17018) # Introduction The command is not idempotent, try to create an already existing FK fails - Always dropping the FK before recreating it in order to prevent this - Removed the `remoteTable` and `remoteServer` from the command We still have the `hasRunOnce` static var that will avoid re running it if a workspace successfully passed the migration Note: This is shared between both the upgrade command and the typeorm migration ## Test locally ```ts atedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object person (20202020-e674-48e5-a542-72570eee7213) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object pet (custom) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object surveyResult (custom) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object rocket (custom) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] All objects already have updatedBy field for workspace 20202020-1c25-4d02-bf25-6aeccf7ea419 [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [AddWorkspaceForeignKeysMigrationCommand] Successfully run AddWorkspaceForeignKeysMigrationCommand [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [UpgradeCommand] Upgrade for workspace 20202020-1c25-4d02-bf25-6aeccf7ea419 completed. [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [UpgradeCommand] Running command on workspace 3b8e6458-5fc1-4e63-8563-008ccddaa6db 2/2 [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [UpgradeCommand] Upgrading workspace 3b8e6458-5fc1-4e63-8563-008ccddaa6db from=1.14.0 to=1.15.0 2/2 [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [MigratePageLayoutWidgetConfigurationCommand] Starting migration of page layout widget configurations for workspace 3b8e6458-5fc1-4e63-8563-008ccddaa6db [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [MigratePageLayoutWidgetConfigurationCommand] Found 0 widget(s) needing migration out of 16 total query: SELECT COUNT(1) AS "cnt" FROM "workspace_3ixj3i1a5avy16ptijtb3lae3"."note" "note" WHERE ( (("note"."position" = $1)) ) AND ( "note"."deletedAt" IS NULL ) -- PARAMETERS: ["NaN"] [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [FixNanPositionValuesInNotesCommand] Found 0 note(s) with NaN position values in workspace 3b8e6458-5fc1-4e63-8563-008ccddaa6db [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [FixNanPositionValuesInNotesCommand] No NaN position values to fix [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Starting backfill of updatedBy field for workspace 3b8e6458-5fc1-4e63-8563-008ccddaa6db [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object note (20202020-0b00-45cd-b6f6-6cd806fc6804) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object task (20202020-1ba1-48ba-bc83-ef7e5990ed10) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object dashboard (20202020-3840-4b6d-9425-0c5188b05ca8) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object workflowRun (20202020-4e28-4e95-a9d7-6c00874f843c) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object workflow (20202020-62be-406c-b9ca-8caa50d51392) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object opportunity (20202020-9549-49dd-b2b2-883999db8938) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object company (20202020-b374-4779-a561-80086cb2e17f) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object attachment (20202020-bd3d-4c60-8dca-571c71d4447a) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object person (20202020-e674-48e5-a542-72570eee7213) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] Object surveyResult (custom) already has updatedBy field, skipping [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [BackfillUpdatedByFieldCommand] All objects already have updatedBy field for workspace 3b8e6458-5fc1-4e63-8563-008ccddaa6db [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [AddWorkspaceForeignKeysMigrationCommand] Skipping has already been run once AddWorkspaceForeignKeysMigrationCommand [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [UpgradeCommand] Upgrade for workspace 3b8e6458-5fc1-4e63-8563-008ccddaa6db completed. [Nest] 17395 - 01/08/2026, 3:04:18 PM LOG [UpgradeCommand] Command completed! ```
PreviousNext