mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-03 02:27:01 +00:00
fix convert lead title
This commit is contained in:
@@ -40,6 +40,9 @@ class Contact extends Person
|
||||
{
|
||||
public const ENTITY_TYPE = 'Contact';
|
||||
|
||||
/** @since v9.3.0. */
|
||||
public const string COLUMN_ACCOUNTS_ROLE = 'role';
|
||||
|
||||
/**
|
||||
* An assigned user.
|
||||
*/
|
||||
|
||||
@@ -197,4 +197,9 @@ class Lead extends Person
|
||||
{
|
||||
return $this->setRelatedLinkOrEntity('campaign', $campaign);
|
||||
}
|
||||
|
||||
public function getTitle(): ?string
|
||||
{
|
||||
return $this->get('title');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,6 +314,14 @@ class ConvertService
|
||||
|
||||
if ($account) {
|
||||
$values->accountId = $account->getId();
|
||||
|
||||
if ($lead->getTitle()) {
|
||||
$values->accountsColumns = (object) [
|
||||
$account->getId() => (object) [
|
||||
Contact::COLUMN_ACCOUNTS_ROLE => $lead->getTitle(),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->recordServiceContainer->getByClass(Contact::class);
|
||||
|
||||
Reference in New Issue
Block a user