Commit Graph

7353 Commits

Author SHA1 Message Date
400dd6d969 bug fix (#13466)
We should not enqueue jobs "unmatch participants" with empty email.

This was done because of deleting persons while persons may have empty
emails

Fixes https://github.com/twentyhq/twenty/issues/13462
2025-07-28 13:56:20 +02:00
ae47157818 Fix empty emails critical bug (#13465)
Fixes https://github.com/twentyhq/twenty/issues/13398

This bug was introduced by https://github.com/twentyhq/twenty/pull/13215

The emails were empty in scenarios where the user wasn't authenticated
(reset passwords for instance) because in `hydrateGraphqlRequest` the
information about the locale was added only if the user was
authenticated `!this.isTokenPresent(request)`. So the locale was
undefined making ` i18n.activate(undefined) ` fail silently resulting in
an empty email.
2025-07-28 12:56:29 +02:00
c59eb20886 Fix metadata playground not accessible (#13446)
as title


## Issue
<img width="982" height="487" alt="image"
src="https://github.com/user-attachments/assets/536567a3-ec36-45ed-b928-5ba4fd98ea70"
/>
2025-07-25 17:26:29 +02:00
8ea816b7ef morph relation : renaming an object (#13404)
# Why
If we have a Morph Relation, like :
Opportunity <-> Company & People

Let's say it's a MANY_TO_ONE on Opportunity side

Then we have two joinColumnNames looking like
- ownerPersonId
- ownerCompanyId

Let's say someone renames the obejct Person (assume we can even though
standard obejcts cannot be renames per say at the moment in the API)

We need to update the joinColumnName and create the associated
migrations
2025-07-25 16:40:51 +02:00
9380a1386a Fix missing components.schema for webhooks (#13433)
Webhooks are still documented in core playground to detail Webhooks of
core objects.
We moved webhooks to metadata playground and forgot to keep computation
of WebhookForResponse

This PR adds it back
2025-07-25 16:36:11 +02:00
d1b11bafe6 remove search any field feature flag (#13442)
<img width="1189" height="368" alt="Screenshot 2025-07-25 at 15 18 39"
src="https://github.com/user-attachments/assets/22879517-60bc-4884-8386-35a0b06a6636"
/>
2025-07-25 15:32:24 +02:00
523d0ac17c Revert "Added public lab feature flag for search any field" (#13441)
Reverts twentyhq/twenty#13430

We will release this in the 1.2
2025-07-25 15:10:58 +02:00
13bed8e4d2 fix createMany resolver when updating softdeleted record (#13425)
Context: updateOne/Many works on soft deleted records but the update of
the upsertMany throws error

fixes https://github.com/twentyhq/twenty/issues/13195
2025-07-25 14:35:04 +02:00
e386303fd3 Disconnect - fix disconnect false (#13439)
Context: {disconnect: false} disconnects relation > fix in this PR + add
integration test
2025-07-25 14:26:05 +02:00
fecac68760 1.2 changelog (#13438) 2025-07-25 14:24:50 +02:00
ab054d51f2 i18n - translations (#13437)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-07-25 13:33:08 +02:00
d4ca63dbb7 Update Connected Accounts Design (#13332)
/closes #13328

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2025-07-25 13:18:02 +02:00
79992b53d1 Fix insert step button not displayed (#13432)
as title
2025-07-25 09:35:48 +00:00
d767a1ca47 Added public lab feature flag for search any field (#13430)
This PR adds a public feature flag for search any field.

This feature flag default value has been set to false also to avoid
breaking the frontend, we'll wait for a sync metadata in the next
release on all workspace to remove this feature flag.
2025-07-25 09:26:53 +00:00
ae13d08017 Improve auth google error msg (#13431)
As title
2025-07-25 11:14:27 +02:00
041d55b605 Fix to gmail / ms auth (#13429)
Use user principal for MS + add verif true for google
2025-07-25 11:10:38 +02:00
3fc795f450 i18n - translations (#13426)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-07-25 10:01:20 +02:00
741924751b Connect - Import Relation (#13419)
re-opened https://github.com/twentyhq/twenty/pull/13213
2025-07-25 09:48:17 +02:00
ca27995ca6 i18n - translations (#13424)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-07-25 08:22:14 +02:00
4b95de6775 Add Import CSV and Export CSV Permissions (#13421)
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2025-07-25 08:07:38 +02:00
f411bd1b0e Add upgrade enqueue enum V2 command (#13422)
Duplicated the existing command `AddEnqueuedStatusToWorkflowRunCommand`.
Adding two steps:
- fetch the `workflowRun` object of the selected workspace
- using that object metadata id in the status field selection
2025-07-24 19:14:03 +02:00
191d3531bf Manage composite fields in step filters (#13407)
- add to step output schema the information that field is a composite
sub field
- from output schema, when selecting the variable, copy all info
required to stepFilter
- from stepFilter, when selecting a value, display a special component
for composites
2025-07-24 17:50:07 +02:00
3aba04abcd Fix date field creation with disabled save button (#13416)
Fixes https://github.com/twentyhq/twenty/issues/13297

See SettingsDataModelFieldDateForm form validation which expects a
settings field to be present with a default display format. This PR adds
the missing initial value.
2025-07-24 17:19:40 +02:00
88a6913217 Connect/Disconnect - Add Disconnect logic + Migration to query builders (insert/update) (#13271)
Context : 
Large PR with 600+ test files. Enable connect and disconnect logic in
createMany (upsert true) / updateOne / updateMany resolvers

- Add disconnect logic
- Gather disconnect and connect logic -> called relation nested queries
- Move logic to query builder (insert and update one) with a preparation
step in .set/.values and an execution step in .execute
- Add integration tests

Test : 
- Test API call on updateMany, updateOne, createMany (upsert:true) with
connect/disconnect
2025-07-24 17:04:38 +02:00
7bfa003682 Workspace migration v2 Metadadata runner object and field (#13377)
# Introduction
Created the runner metadata for the field and object
We should keep in mind that any runner handler will only iterate over an
atomic instance of entity ( object field index etc )
Never triggerring any side effect or whats over

In this way we will need to implement a deferred transaction, as for
when we create a relation we will inject to the first created field of
both the `relationTargetFieldMetadataId` deterministically computed
before its own creation
This would result in pg constraint brokage if not deferred

## Updates
- We decided gather create_fields under the create_object as they will
be building within the same sql query. This will ease both generation
and computation and avoid disassembling to reassemble afterwards
- Refactored FlatFieldMetadata to handle relation typing with flat
occurences
```ts
  runCreateFieldSchemaMigration = async ({
    action,
    queryRunner,
  }: WorkspaceMigrationActionRunnerArgs<CreateFieldAction>) => {
    if (isFlatFieldMetadataEntityOfType(action.flatFieldMetadata, FieldMetadataType.RELATION)) {
      action.flatFieldMetadata.flatRelationTargetObjectMetadata
    }else {
      action.flatFieldMetadata.flatRelationTargetObjectMetadata // tsc-error never
    }
    return;
  };
```

## TODO
- ~~Discuss action signature with @Weiko in order to anticipate `schema`
runner needed grain~~
- ~~Refactor the object actions to contain picked `flatObjectMetadata`~~
- Implem index service
2025-07-24 17:04:01 +02:00
099694411c Add nextStepIds to trigger (#13413)
We will have floating steps in our workflow with the branch design.
Currently, a step without parent is considered linked to the trigger. We
need to distinguish the 2 cases. Thus this PR:
- add `nextStepIds` to workflowVersion.trigger
- create a command to migrate existing triggers
2025-07-24 16:31:10 +02:00
7ee250efe7 Fix rest filter parsing (#13414)
Should now properly match logical expressions like and(...), or(...)
instead of and/or without parenthesis, this should fix the issue with
fields that start with or/and
2025-07-24 16:06:06 +02:00
5c15a5954b Workspace Folder Deletion Error - add logs for investigation (#13385)
https://twenty-v7.sentry.io/issues/6565008010/events/latest/?environment=prod&project=4507072499810304&referrer=latest-event&sort=date

related to https://github.com/twentyhq/twenty/issues/12299
2025-07-24 13:34:41 +00:00
16fcaacbdb Translation cleanup (#13411)
Remove dead translations
2025-07-24 15:33:24 +02:00
ca1e79b9a7 Small translation fix (#13410) 2025-07-24 15:10:15 +02:00
a83825f4be Remove dead translations (#13409)
Add --clean flag to translation extraction to remove old translations
automatically
2025-07-24 14:50:57 +02:00
e84e47dd6b i18n - translations (#13408)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-07-24 14:43:28 +02:00
1ea451c8be Morph Relations : deleteOneField (#13349)
This PR adapts teh deleteOneField to make sure morph relations can be
deleted, either
- from a relation type, 
- or from a morph relation type (which is the most obvious case).

This PR covers 
- the deletion of fieldMetadata 
- and the migrationof workspace schemas, by using the already existing
definition of relation migrations

This PR implements a new test suite: "Delete Object metadata with morph
relation" and completes the other test suites for FieldMetadata and
ObjectMetadata creation/deletion.

Last, we added a nitpick from @paul I forgot on a previous PR on
process-nested-realtion-v2

Fixes https://github.com/twentyhq/core-team-issues/issues/1197
2025-07-24 12:40:14 +00:00
15e13b4267 i18n - translations (#13406)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-07-24 12:38:12 +02:00
e93adde4b8 Decouple Send Email node from workflows (#13322)
- Renamed `WorkflowActionAdapter` to `ToolExecutorWorkflowAction`
- Renamed `settingPermission` table to `permissionFlag` and `setting`
column to `flag`
- Decoupled the send email logic from workflows to tools
- Add new `Tools Permission` section in FE

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
2025-07-24 12:31:33 +02:00
eb404478c3 i18n - translations (#13405)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-07-24 12:21:17 +02:00
d468c3dc84 Add ability to save any field filter to view (#13401)
This PR adds the ability to save an any field filter to a view.

It adds a new `anyFieldFilterValue` on both core view and workspace view
entities.

It also introduces the necessary utils that mimic the logic that manages
the save of record filters and record sorts on views.
2025-07-24 10:08:16 +00:00
7653be8fde Improve view migration command (#13403)
Remove unused imports.
Improve typing.
2025-07-24 11:50:25 +02:00
e18005f937 Fix field metadata comparator (#13390) 2025-07-24 08:22:17 +00:00
9211113a12 Fix AI agent workflow node output variables issue (#13396)
https://github.com/user-attachments/assets/2d086fb6-7c3d-4584-adc0-b2781072be4a

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-07-23 23:08:17 +02:00
23a1540b0f i18n - translations (#13395)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-07-23 22:21:14 +02:00
30dd457313 App version mismatch handling between frontend and backend (#13368)
https://github.com/user-attachments/assets/d153f177-4d70-4ec6-8693-15413e550938
2025-07-24 01:37:02 +05:30
ed36b19af7 Fix increment/decrement methods in twenty orm (#13389)
Increment/Decrement methods were broken and were executing a SELECT
query while selecting twice the same table so the id column reference
was not precise enough. For some reason it didn't recognise the builder
as an update builder AND aliases were not parsed properly
I've modified the code to re-use the existing update method that is
correctly implemented-

BEFORE
```sql
query failed: SELECT entity FROM "workspace_1wgvd1injqtife6y4rvfbu3h5"."viewField" "entity", "workspace_1wgvd1injqtife6y4rvfbu3h5"."viewField" "workspace_1wgvd1injqtife6y4rvfbu3h5.viewField" WHERE "id" IN ($1) -- PARAMETERS: ["cd665f5b-c3ce-44ec-a9b0-51a2d711287e"]
error: error: column reference "id" is ambiguous
```


AFTER
```sql
query: UPDATE "workspace_1wgvd1injqtife6y4rvfbu3h5"."viewField" SET "position" = "position" + 1, "updatedAt" = CURRENT_TIMESTAMP WHERE "id" IN ($1) -- PARAMETERS: ["cd665f5b-c3ce-44ec-a9b0-51a2d711287e"]
```
2025-07-23 19:28:23 +02:00
c769f9f2d2 fix: invalid byte sequence for encoding (#13387)
/closes #13366

cc
@FelixMalfait
2025-07-23 18:15:08 +02:00
f439a6cd9e fix: normalize version number using semver.coerce in admin panel version info (#13348)
### Summary

This PR fixes an inconsistency in the display of application versions in
the Admin Panel. Previously, the "Current version" was displayed with a
"v" prefix (e.g., `v1.1.1`), while the "Latest version" was displayed
without it (e.g., `1.1.1`).

### Problem

The inconsistency originated from two different data sources being
handled differently in the backend:
- `currentVersion` was read directly from the `APP_VERSION`
configuration variable, which includes the "v" prefix.
- `latestVersion` was fetched from the Docker Hub API, and the
`semver.coerce()` function was used to parse it, which strips the "v"
prefix.

![Jb ScreenShot 2025-07-22 at 16 47
05@2x](https://github.com/user-attachments/assets/b6243d03-2730-4958-8ad9-68f7e461bbe2)


### Solution

The fix addresses the root cause in the [AdminPanelService] on the
backend. The `semver.coerce()` function is now also applied to the
`currentVersion`.

This ensures that both version numbers are normalized at the data
source, providing a consistent format before being sent to the frontend.
This is a cleaner approach than manipulating the data on the client
side.

**Before:**
- Current version: `v1.1.1`
- Latest version: `1.1.1`

**After:**
- Current version: `1.1.1`
- Latest version: `1.1.1`

---------

Co-authored-by: prastoin <paul@twenty.com>
2025-07-23 15:44:09 +00:00
ae6adb3a63 [permissions] Add read field permission check layer (part 1) (#13376)
In this PR, behind a feature flag, we add a permission layer check based
on the read permission.
It is done by computing a map of an object's fields, where keys are the
column names and values the fieldMetadata id, making them comparable to
the restricted fields ids list stored in the permission cache.

For mutations (create, update, delete, destroy), we need to check the
read permission on the returned field, as they may differ from the
updated field. The write field permission will be tackled in a different
PR.
2025-07-23 15:25:34 +00:00
1e5d2f9b21 fix: phone input validation error should display red borders like email input (#13275)
ISSUE 

- closes #13032

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2025-07-23 15:52:41 +02:00
186891883e i18n - translations (#13384)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-07-23 15:27:36 +02:00
0e561e4ef4 fix: migrate webhook and API key REST endpoints to core schema (#13318)
## Problem
After migrating webhooks and API keys from workspace to core level, REST
API endpoints were still creating entities in workspace schema
(`workspace_*`) instead of core schema, causing webhooks to not fire.

## Solution
- Added dedicated REST controllers for webhooks (`/rest/webhooks`) and
API keys (`/rest/apiKeys`)
- Updated dynamic controller to block workspace-gated entities from
being processed
- Fixed OpenAPI documentation to exclude these endpoints from playground
- Ensured return formats match GraphQL resolvers exactly

## Testing
 All endpoints tested with provided auth token - webhooks and API keys
now correctly stored in `core` schema
2025-07-23 13:11:53 +00:00
05a09d7a73 i18n - translations (#13380)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-07-23 15:04:35 +02:00