{"record":{"id":"90d65c86dc20e530","repo":"twentyhq/twenty","slug":"failed-to-set-displayedmaxrows-on-calendarevent-de","errorCode":null,"errorMessage":"Failed to set displayedMaxRows on calendarEvent.description for workspace ${workspaceId}: ${JSON.stringify(validateAndBuildResult, null, 2)}","messagePattern":"Failed to set displayedMaxRows on calendarEvent\\.description for workspace (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/twenty-server/src/database/commands/upgrade-version-command/2-2/2-2-workspace-command-1786000000000-set-calendar-event-description-displayed-max-rows.command.ts","lineNumber":111,"sourceCode":"\n    const validateAndBuildResult =\n      await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunLegacyWorkspaceMigration(\n        {\n          allFlatEntityOperationByMetadataName: {\n            fieldMetadata: {\n              flatEntityToCreate: [],\n              flatEntityToDelete: [],\n              flatEntityToUpdate: [fieldToUpdate],\n            },\n          },\n          workspaceId,\n          applicationUniversalIdentifier:\n            twentyStandardFlatApplication.universalIdentifier,\n        },\n      );\n\n    if (validateAndBuildResult.status === 'fail') {\n      throw new Error(\n        `Failed to set displayedMaxRows on calendarEvent.description for workspace ${workspaceId}: ${JSON.stringify(validateAndBuildResult, null, 2)}`,\n      );\n    }\n\n    this.logger.log(\n      `Set displayedMaxRows on calendarEvent.description for workspace ${workspaceId}`,\n    );\n  }\n}\n","sourceCodeStart":93,"sourceCodeEnd":121,"githubUrl":"https://github.com/twentyhq/twenty/blob/1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6/packages/twenty-server/src/database/commands/upgrade-version-command/2-2/2-2-workspace-command-1786000000000-set-calendar-event-description-displayed-max-rows.command.ts#L93-L121","documentation":"Thrown by the 2.2 command that sets displayedMaxRows on the calendarEvent.description field when validateBuildAndRunLegacyWorkspaceMigration returns status 'fail' for the fieldToUpdate update payload. The full validateAndBuildResult is JSON-stringified into the message.","triggerScenarios":"Running the 2.2 upgrade on a workspace where calendarEvent.description is missing, not a TEXT/long-text type that supports displayedMaxRows, or has an override that conflicts with the update. Also when the field is referenced in a way that locks it from update.","commonSituations":"Workspace on an older release where description has a different type or custom override; prior partial run; standard seed drift for the calendarEvent object.","solutions":["Read the JSON payload to find the failing validation code.","Confirm calendarEvent.description exists, is active, and is a TEXT-type field supporting displayedMaxRows.","Reconcile any custom override on the description field, then re-run.","Rebuild the image if the standard seed for calendarEvent is stale."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm calendarEvent.description is a TEXT-type field supporting displayedMaxRows.\nconst desc = await dataSource.query(`\n  SELECT \"type\" FROM core.\"fieldMetadata\"\n  WHERE \"nameSingular\" = 'description'\n    AND \"objectMetadataId\" = (SELECT id FROM core.\"objectMetadata\" WHERE \"nameSingular\" = 'calendarEvent')\n`);\nif (!desc.length) throw new Error('calendarEvent.description missing');\nif (!['TEXT', 'LONG_TEXT', 'RICH_TEXT'].includes(desc[0].type)) {\n  throw new Error(`description type ${desc[0].type} does not support displayedMaxRows`);\n}","typeGuard":"function isFailResult(r: unknown): r is { status: 'fail' } {\n  return typeof r === 'object' && r !== null && (r as any).status === 'fail';\n}","tryCatchPattern":"try {\n  const res = await service.validateBuildAndRunLegacyWorkspaceMigration(payload);\n  if (res.status === 'fail') throw new Error(`...${JSON.stringify(res, null, 2)}`);\n} catch (err) { upgradeAudit.record(workspaceId, command.id, err); throw err; }","preventionTips":["Keep the calendarEvent object aligned to the standard seed.","Avoid manual edits to standard field types or overrides.","Deploy matching standard seed and command code in one image."],"tags":["migration","workspace-upgrade","metadata-validation","calendar-event"],"backgroundTag":null,"analyzedSha":"1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6","analyzedAt":"2026-08-12T15:37:27.593Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}