diff --git a/application/Espo/Core/Mail/Importer.php b/application/Espo/Core/Mail/Importer.php index 59732056d9..f935a65f70 100644 --- a/application/Espo/Core/Mail/Importer.php +++ b/application/Espo/Core/Mail/Importer.php @@ -351,7 +351,7 @@ class Importer if ($email->get('messageId')) { $duplicate = $this->getEntityManager()->getRepository('Email')->select(['id'])->where(array( 'messageId' => $email->get('messageId') - ))->findOne(); + ))->findOne(['skipAdditionalSelectParams' => true]); if ($duplicate) { return $duplicate; } diff --git a/application/Espo/ORM/Repositories/RDB.php b/application/Espo/ORM/Repositories/RDB.php index b0f049288c..b501b9ec71 100644 --- a/application/Espo/ORM/Repositories/RDB.php +++ b/application/Espo/ORM/Repositories/RDB.php @@ -187,7 +187,9 @@ class RDB extends \Espo\ORM\Repository public function find(array $params = array()) { - $this->handleSelectParams($params); + if (empty($params['skipAdditionalSelectParams'])) { + $this->handleSelectParams($params); + } $params = $this->getSelectParams($params); $dataArr = $this->getMapper()->select($this->seed, $params); @@ -230,7 +232,9 @@ class RDB extends \Espo\ORM\Repository } if ($entityType) { - $this->getEntityManager()->getRepository($entityType)->handleSelectParams($params); + if (empty($params['skipAdditionalSelectParams'])) { + $this->getEntityManager()->getRepository($entityType)->handleSelectParams($params); + } } $result = $this->getMapper()->selectRelated($entity, $relationName, $params); @@ -250,7 +254,9 @@ class RDB extends \Espo\ORM\Repository return; } $entityType = $entity->relations[$relationName]['entity']; - $this->getEntityManager()->getRepository($entityType)->handleSelectParams($params); + if (empty($params['skipAdditionalSelectParams'])) { + $this->getEntityManager()->getRepository($entityType)->handleSelectParams($params); + } return intval($this->getMapper()->countRelated($entity, $relationName, $params)); } @@ -423,7 +429,9 @@ class RDB extends \Espo\ORM\Repository public function count(array $params = array()) { - $this->handleSelectParams($params); + if (empty($params['skipAdditionalSelectParams'])) { + $this->handleSelectParams($params); + } $params = $this->getSelectParams($params); $count = $this->getMapper()->count($this->seed, $params); diff --git a/application/Espo/Resources/metadata/entityDefs/Note.json b/application/Espo/Resources/metadata/entityDefs/Note.json index d085ce0fb9..88f012b37c 100644 --- a/application/Espo/Resources/metadata/entityDefs/Note.json +++ b/application/Espo/Resources/metadata/entityDefs/Note.json @@ -124,7 +124,6 @@ }, "statusStyles": { "Lead": { - "New" : "primary", "Assigned" : "primary", "In Process" : "primary", "Converted" : "success", @@ -140,14 +139,8 @@ "Duplicate" : "danger" }, "Opportunity": { - "Prospecting": "primary", - "Qualification": "primary", - "Needs Analysis": "primary", - "Value Proposition": "primary", - "Id. Decision Makers": "primary", - "Perception Analysis": "primary", - "Proposal/Price Quote": "primary", - "Negotiation/Review": "primary", + "Proposal": "primary", + "Negotiation": "primary", "Closed Won" : "success", "Closed Lost" : "danger" }, diff --git a/client/src/views/admin/field-manager/edit.js b/client/src/views/admin/field-manager/edit.js index 905b7b8c66..e718f46158 100644 --- a/client/src/views/admin/field-manager/edit.js +++ b/client/src/views/admin/field-manager/edit.js @@ -117,7 +117,7 @@ Espo.define('views/admin/field-manager/edit', ['view', 'model'], function (Dep, }.bind(this)) ]).then(function () { this.paramList = []; - var paramList = this.getFieldManager().getParams(this.type) || []; + var paramList = Espo.Utils.clone(this.getFieldManager().getParams(this.type) || []); if (!this.isNew) { (this.getMetadata().get(['entityDefs', this.scope, 'fields', this.field, 'fieldManagerAdditionalParamList']) || []).forEach(function (item) {