-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add createdBy field on custom object creation #6529
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR adds a createdBy
field to custom objects and addresses a bug related to custom fields named 'data' in mutations.
packages/twenty-server/src/engine/api/graphql/workspace-query-builder/factories/create-many-query.factory.ts
: Fixed bug withargs.data
handling to avoid conflicts with 'data' custom fields.packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.service.ts
: AddedcreatedBy
field and movedname
andposition
fields to default columns.packages/twenty-server/src/engine/workspace-manager/workspace-migration-runner/utils/custom-table-default-column.util.ts
: Added new default columns includingcreatedBySource
andcreatedByWorkspaceMemberId
.packages/twenty-server/src/engine/workspace-manager/workspace-migration-runner/workspace-migration-runner.service.ts
: UpdatedcreateTable
method to dynamically generate default columns based on table name.packages/twenty-server/src/engine/api/graphql/workspace-query-builder/factories/update-one-query.factory.ts
: Fixed bug withargs.data
handling in update mutations.
8 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
@@ -265,6 +265,20 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt | |||
workspaceId: objectMetadataInput.workspaceId, | |||
defaultValue: 'now', | |||
}, | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops yes nice catch! 😄
{ | ||
name: 'createdBySource', | ||
type: 'enum', | ||
enumName: `${tableName}_createdBySource_enum`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm always confused with that, are we really using camelcase for enum names? @charlesBochet (including the tableName that will be in camelCase as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, everything is camelCase and values should be UPPER_CASE
…ed (#6531) In this PR: - take feedbacks from: #6530 / #6529 / #6526 / #6512 - refactor onboarding uservars to be absent when the user is fully onboarded: isStepComplete ==> isStepIncomplete - introduce a new workspace.activationStatus: CREATION_ONGOING I'm retesting the whole flow: - with/without BILLING - sign in with/without SSO - sign up with/without SSO - another workspaceMembers join the team - subscriptionCanceled - access to billingPortal
In this PR, I'm:
name
andposition
default column to the set of columns automatically creation on object creation