Merge branch 'hotfix/6.0.9'

This commit is contained in:
Yuri Kuznetsov
2020-12-17 16:22:07 +02:00
8 changed files with 43 additions and 8 deletions

View File

@@ -49,6 +49,9 @@ class CategoryTree extends Database
->select()
->from($pathEntityType)
->select(['ascendorId', "'" . $entity->id . "'"])
->where([
'descendorId' => $parentId,
])
->build();
$subSelect2 = $em->getQueryBuilder()

View File

@@ -270,6 +270,7 @@
"notModified": "You have not modified the record",
"duplicate": "The record you are creating might already exist",
"dropToAttach": "Drop to attach",
"fieldInvalid": "{field} is invalid",
"fieldIsRequired": "{field} is required",
"fieldShouldBeEmail": "{field} should be a valid email",
"fieldShouldBeFloat": "{field} should be a valid float",

View File

@@ -12,7 +12,7 @@
},
"userId": {
"type": "varchar",
"maxLength": 11,
"maxLength": 24,
"index": true
}
}

View File

@@ -81,7 +81,7 @@ class Notification extends \Espo\Services\Record implements
$collection = $this->entityManager->createCollection();
$userList = $this->getEntityManager()->getRepository('User')
->select(['id'])
->select(['id', 'type'])
->where([
'isActive' => true,
'id' => $userIdList,
@@ -90,7 +90,10 @@ class Notification extends \Espo\Services\Record implements
foreach ($userList as $user) {
$userId = $user->id;
if (!$this->checkUserNoteAccess($user, $note)) continue;
if (!$this->checkUserNoteAccess($user, $note)) {
continue;
}
if ($note->get('createdById') === $user->id) continue;
if ($related && $related->getEntityType() == 'Email' && $related->get('sentById') == $user->id) continue;
if ($related && $related->get('createdById') == $user->id) continue;

View File

@@ -257,6 +257,8 @@ define('views/fields/base', 'view', function (Dep) {
this.events = {};
}
this.validations = Espo.Utils.clone(this.validations);
this.defs = this.options.defs || {};
this.name = this.options.name || this.defs.name;
this.params = this.options.params || this.defs.params || {};

View File

@@ -25,14 +25,40 @@
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
Espo.define('views/settings/fields/default-currency', 'views/fields/enum', function (Dep) {
define('views/settings/fields/default-currency', 'views/fields/enum', function (Dep) {
return Dep.extend({
setup: function () {
Dep.prototype.setup.call(this);
this.validations.push('existing');
},
setupOptions: function () {
this.params.options = Espo.Utils.clone(this.getConfig().get('currencyList') || []);
}
},
validateExisting: function () {
var currencyList = this.model.get('currencyList');
if (!currencyList) {
return;
}
var value = this.model.get(this.name);
if (~currencyList.indexOf(value)) {
return;
}
var msg = this.translate('fieldInvalid', 'messages').replace('{field}', this.getLabelText());
this.showValidationMessage(msg);
return true;
},
});
});

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "6.0.7",
"version": "6.0.8",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "6.0.7",
"version": "6.0.8",
"description": "",
"main": "index.php",
"repository": {