Merge branch 'hotfix/5.6.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/5.6.2
This commit is contained in:
@@ -38,7 +38,9 @@ class Opportunity extends \Espo\Core\ORM\Repositories\RDB
|
||||
if ($entity->isNew()) {
|
||||
if (!$entity->has('probability') && $entity->get('stage')) {
|
||||
$probability = $this->getMetadata()->get('entityDefs.Opportunity.fields.stage.probabilityMap.' . $entity->get('stage'), 0);
|
||||
$entity->set('probability', $probability);
|
||||
if (!is_null($probability)) {
|
||||
$entity->set('probability', $probability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
"sentCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
@@ -68,6 +69,7 @@
|
||||
"view": "crm:views/campaign/fields/int-with-percentage",
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
@@ -75,12 +77,14 @@
|
||||
"view": "crm:views/campaign/fields/int-with-percentage",
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
"optedInCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
@@ -88,6 +92,7 @@
|
||||
"view": "crm:views/campaign/fields/int-with-percentage",
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
@@ -95,54 +100,63 @@
|
||||
"view": "crm:views/campaign/fields/int-with-percentage",
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
"hardBouncedCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
"softBouncedCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
"leadCreatedCount": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
"openedPercentage": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
"clickedPercentage": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
"optedOutPercentage": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
"bouncedPercentage": {
|
||||
"type": "int",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
"revenue": {
|
||||
"type": "currency",
|
||||
"notStorable": true,
|
||||
"directAccessDisabled": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
|
||||
@@ -202,7 +202,8 @@
|
||||
"cronIsNotConfigured": "Scheduled jobs are not running. Hence inbound emails, notifications and reminders are not working. Please follow the [instructions](https://www.espocrm.com/documentation/administration/server-configuration/#user-content-setup-a-crontab) to setup cron job.",
|
||||
"newVersionIsAvailable": "New EspoCRM version {latestVersion} is available.",
|
||||
"newExtensionVersionIsAvailable": "New {extensionName} version {latestVersion} is available.",
|
||||
"uninstallConfirmation": "Are you sure you want to uninstall the extension?"
|
||||
"uninstallConfirmation": "Are you sure you want to uninstall the extension?",
|
||||
"upgradeInfo": "Check the <a href=\"{url}\">documentation</a> about how to upgrade your EspoCRM instance. Upgrading from CLI is the most preferable way."
|
||||
},
|
||||
"descriptions": {
|
||||
"settings": "System settings of application.",
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
"targetTeam": "Target Team",
|
||||
"exampleRequestMethod": "Method",
|
||||
"exampleRequestUrl": "URL",
|
||||
"exampleRequestPayload": "Payload"
|
||||
"exampleRequestPayload": "Payload",
|
||||
"duplicateCheck": "Duplicate Check"
|
||||
},
|
||||
"links": {
|
||||
"targetList": "Target List",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
[{"name": "subscribeContactToTargetList"}, {"name": "targetList"}],
|
||||
[{"name": "targetTeam"}, {"name": "leadSource"}],
|
||||
[{"name": "fieldList", "fullWidth": true}],
|
||||
[{"name": "duplicateCheck"}, false],
|
||||
[{"name": "apiKey", "fullWidth": true}]
|
||||
]
|
||||
},
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"label":"",
|
||||
"rows":[
|
||||
[{"name": "target"}, {"name":"leadCapture"}],
|
||||
[{"name": "isCreated"}, {"name":"createdAt"}],
|
||||
[{"name": "data", "fullWidth": true}]
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,4 @@
|
||||
[
|
||||
"isCreated",
|
||||
"createdAt"
|
||||
]
|
||||
@@ -1,4 +1,5 @@
|
||||
[
|
||||
{"name":"target"},
|
||||
{"name":"createdAt", "width": "30"}
|
||||
{"name":"target", "notSortable": true},
|
||||
{"name":"isCreated", "width": "25", "notSortable": true},
|
||||
{"name":"createdAt", "width": "30", "notSortable": true}
|
||||
]
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
},
|
||||
"relationshipPanels": {
|
||||
"logRecords": {
|
||||
"rowActionsView": "views/record/row-actions/remove-only",
|
||||
"rowActionsView": "views/record/row-actions/view-and-remove",
|
||||
"layout": "listForLeadCapture",
|
||||
"select": false,
|
||||
"create": false
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"modalViews": {
|
||||
"detail": "views/lead-capture-log-record/modals/detail"
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,10 @@
|
||||
"createdContact"
|
||||
]
|
||||
},
|
||||
"duplicateCheck": {
|
||||
"type": "bool",
|
||||
"default": true
|
||||
},
|
||||
"optInConfirmation": {
|
||||
"type": "bool"
|
||||
},
|
||||
|
||||
@@ -123,6 +123,7 @@ class Email extends Record
|
||||
|
||||
$primaryUserAddress = strtolower($this->getUser()->get('emailAddress'));
|
||||
$fromAddress = strtolower($entity->get('from'));
|
||||
$originalFromAddress = $entity->get('from');
|
||||
|
||||
if (empty($fromAddress)) {
|
||||
throw new Error("Can't send with empty from address.");
|
||||
@@ -143,7 +144,7 @@ class Email extends Record
|
||||
}
|
||||
|
||||
$emailAccountService = $this->getServiceFactory()->create('EmailAccount');
|
||||
$emailAccount = $emailAccountService->findAccountForUser($this->getUser(), $fromAddress);
|
||||
$emailAccount = $emailAccountService->findAccountForUser($this->getUser(), $originalFromAddress);
|
||||
|
||||
if (!$smtpParams) {
|
||||
if ($emailAccount && $emailAccount->get('useSmtp')) {
|
||||
@@ -156,15 +157,15 @@ class Email extends Record
|
||||
}
|
||||
|
||||
if ($smtpParams) {
|
||||
if ($fromAddress) {
|
||||
$this->applySmtpHandler($this->getUser()->id, $fromAddress, $smtpParams);
|
||||
if ($emailAddress) {
|
||||
$this->applySmtpHandler($this->getUser()->id, $emailAddress, $smtpParams);
|
||||
}
|
||||
$emailSender->useSmtp($smtpParams);
|
||||
}
|
||||
|
||||
if (!$smtpParams) {
|
||||
$inboundEmailService = $this->getServiceFactory()->create('InboundEmail');
|
||||
$inboundEmail = $inboundEmailService->findSharedAccountForUser($this->getUser(), $fromAddress);
|
||||
$inboundEmail = $inboundEmailService->findSharedAccountForUser($this->getUser(), $originalFromAddress);
|
||||
if ($inboundEmail) {
|
||||
$smtpParams = $inboundEmailService->getSmtpParamsFromAccount($inboundEmail);
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ class EmailAccount extends Record
|
||||
$imapParams = null;
|
||||
|
||||
if ($emailAddress && $userId) {
|
||||
$emailAddress = strtolower($emailAddress);
|
||||
$userData = $this->getEntityManager()->getRepository('UserData')->getByUserId($userId);
|
||||
if ($userData) {
|
||||
$imapHandlers = $userData->get('imapHandlers') ?? (object) [];
|
||||
|
||||
@@ -242,7 +242,9 @@ class LeadCapture extends Record
|
||||
$groupOr['phoneNumber'] = $lead->get('phoneNumber');
|
||||
}
|
||||
|
||||
$duplicate = $this->getEntityManager()->getRepository('Lead')->where(['OR' => $groupOr])->findOne();
|
||||
if ($leadCapture->get('duplicateCheck')) {
|
||||
$duplicate = $this->getEntityManager()->getRepository('Lead')->where(['OR' => $groupOr])->findOne();
|
||||
}
|
||||
$contact = $this->getEntityManager()->getRepository('Contact')->where(['OR' => $groupOr])->findOne();
|
||||
if ($contact) {
|
||||
$target = $contact;
|
||||
|
||||
@@ -37,7 +37,10 @@ Espo.define('crm:views/opportunity/fields/stage', 'views/fields/enum', function
|
||||
|
||||
if (this.mode != 'list') {
|
||||
this.on('change', function () {
|
||||
this.model.set('probability', this.probabilityMap[this.model.get(this.name)]);
|
||||
var probability = this.probabilityMap[this.model.get(this.name)];
|
||||
if (probability !== null && probability !== undefined) {
|
||||
this.model.set('probability', probability);
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
<div class="page-header"><h3><a href="#Admin">{{translate 'Administration'}}</a> » {{translate 'Upgrade' scope='Admin'}}</h3></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
|
||||
<div class="panel panel-danger notify">
|
||||
<div class="panel-body">
|
||||
<p class="text-danger notify-text">
|
||||
{{versionMsg}}
|
||||
<br><br>
|
||||
{{{infoMsg}}}
|
||||
<br><br>
|
||||
{{backupsMsg}}
|
||||
</p>
|
||||
</div>
|
||||
@@ -29,4 +34,5 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,8 +37,9 @@ Espo.define('views/admin/upgrade/index', 'view', function (Dep) {
|
||||
data: function () {
|
||||
return {
|
||||
versionMsg: this.translate('Current version') + ': ' + this.getConfig().get('version'),
|
||||
infoMsg: this.translate('upgradeInfo', 'messages', 'Admin').replace('{url}', 'https://www.espocrm.com/documentation/administration/upgrading/'),
|
||||
backupsMsg: this.translate('upgradeBackup', 'messages', 'Admin'),
|
||||
downloadMsg: this.translate('downloadUpgradePackage', 'messages', 'Admin').replace('{url}', 'http://www.espocrm.com/download/upgrades')
|
||||
downloadMsg: this.translate('downloadUpgradePackage', 'messages', 'Admin').replace('{url}', 'https://www.espocrm.com/download/upgrades')
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* 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.
|
||||
************************************************************************/
|
||||
|
||||
define('views/lead-capture-log-record/modals/detail', 'views/modals/detail', function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
editDisabled: true,
|
||||
|
||||
fullFormDisabled: true,
|
||||
|
||||
});
|
||||
});
|
||||
@@ -116,7 +116,7 @@ define('web-socket-manager', [], function () {
|
||||
if (e.message) {
|
||||
console.error(e.message);
|
||||
} else {
|
||||
console.error("WebSocket: Coud not subscribe to "+category+".");
|
||||
console.error("WebSocket: Could not subscribe to "+category+".");
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -129,7 +129,7 @@ define('web-socket-manager', [], function () {
|
||||
if (e.message) {
|
||||
console.error(e.message);
|
||||
} else {
|
||||
console.error("WebSocket: Coud not unsubscribe from "+category+".");
|
||||
console.error("WebSocket: Could not unsubscribe from "+category+".");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -178,6 +178,14 @@ blockquote {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.table tr > th {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.table tr.accented {
|
||||
background-color: @table-bg-accent;
|
||||
}
|
||||
|
||||
.form-group.hidden-cell {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,8 @@
|
||||
@btn-default-bg: @main-gray;
|
||||
@btn-default-border: @main-gray;
|
||||
|
||||
@table-bg-accent: #f9f9f9;
|
||||
|
||||
@code-bg: #f9f9f9;
|
||||
@code-color: @text-color;
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "5.6.1",
|
||||
"version": "5.6.2",
|
||||
"description": "",
|
||||
"main": "index.php",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user