Skip to content

EspoCRM – Open Source CRM Application

Composite field type param.

Yurii889d79693f78
diff --git a/application/Espo/Resources/metadata/fields/address.json b/application/Espo/Resources/metadata/fields/address.json
index be634b3284..3c80ce789a 100644
--- a/application/Espo/Resources/metadata/fields/address.json
+++ b/application/Espo/Resources/metadata/fields/address.json
@@ -62,6 +62,7 @@
],
"notMergeable": true,
"notCreatable": false,
+ "composite": true,
"filter": true,
"skipOrmDefs": true,
"personalData": true,
diff --git a/application/Espo/Resources/metadata/fields/currency.json b/application/Espo/Resources/metadata/fields/currency.json
index df3364e4ac..25ba440920 100644
--- a/application/Espo/Resources/metadata/fields/currency.json
+++ b/application/Espo/Resources/metadata/fields/currency.json
@@ -80,7 +80,8 @@
"customizationDefaultView": "views/admin/field-manager/fields/currency-default",
"customizationTooltipTextDisabled": true,
"maxLength": 3,
- "apiSpecDisabled": true
+ "apiSpecDisabled": true,
+ "noOptimisticConcurrencyControlResolution": true
},
"converted": {
"type": "currencyConverted",
diff --git a/application/Espo/Resources/metadata/fields/personName.json b/application/Espo/Resources/metadata/fields/personName.json
index 0d4745fb40..d455637319 100644
--- a/application/Espo/Resources/metadata/fields/personName.json
+++ b/application/Espo/Resources/metadata/fields/personName.json
@@ -38,6 +38,7 @@
"converterClassName": "Espo\\Core\\Utils\\Database\\Orm\\FieldConverters\\PersonName",
"notMergeable": true,
"notCreatable": true,
+ "composite": true,
"filter": true,
"skipOrmDefs": false,
"personalData": true,
diff --git a/client/src/views/modals/resolve-save-conflict.js b/client/src/views/modals/resolve-save-conflict.js
index 4876f25e36..dd717d2f23 100644
--- a/client/src/views/modals/resolve-save-conflict.js
+++ b/client/src/views/modals/resolve-save-conflict.js
@@ -138,9 +138,19 @@ class ResolveSaveConflictModalView extends ModalView {
const fieldList = [];
+
this.getFieldManager()
.getEntityTypeFieldList(this.entityType)
.forEach(field => {
+ const fieldType = this.model.getFieldType(field);
+
+ if (
+ this.getMetadata().get(`fields.${fieldType}.composite`) ||
+ this.model.getFieldParam(field, 'noOptimisticConcurrencyControlResolution')
+ ) {
+ return;
+ }
+
const fieldAttributeList = this.getFieldManager()
.getEntityTypeFieldAttributeList(this.entityType, field);
diff --git a/schema/metadata/entityDefs.json b/schema/metadata/entityDefs.json
index 0a94d56afc..a88b7555e6 100644
--- a/schema/metadata/entityDefs.json
+++ b/schema/metadata/entityDefs.json
@@ -1237,6 +1237,10 @@
"type": "boolean",
"description": "Whether the field may contain personal data."
},
+ "noOptimisticConcurrencyControlResolution": {
+ "type": "boolean",
+ "description": "Disables optimistic concurrency control resolution. As of v10.1."
+ },
"valueFactoryClassName": {
"type": "string",
"description": "A factory for value objects. For field types it's defined at metadata > fields. Here you can define a factory for a specific field."
diff --git a/schema/metadata/fields.json b/schema/metadata/fields.json
index c872a1e42b..4c21ef78d0 100644
--- a/schema/metadata/fields.json
+++ b/schema/metadata/fields.json
@@ -13,6 +13,10 @@
"type": "boolean",
"description": "Whether the field of this type can be created in the Entity Manager tool."
},
+ "composite": {
+ "type": "boolean",
+ "description": "Whether the field is composite. It means it groups other fields and had no attributes that are not from the grouped fields."
+ },
"readOnly": {
"type": "boolean",
"description": "Is this field type Read Only (can't be edited)."