Merge pull request #19401 from altairisfr/autocontact

add author as contact
This commit is contained in:
Laurent Destailleur 2021-11-18 20:02:59 +01:00 committed by GitHub
commit 07004e21ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -492,6 +492,13 @@ class Ticket extends CommonObject
}
}
if (!$error && ! empty($conf->global->TICKET_ADD_AUTHOR_AS_CONTACT)) {
// add creator as contributor
if ($this->add_contact($user->id, 'CONTRIBUTOR', 'internal') < 0) {
$error++;
}
}
//Update extrafield
if (!$error) {
$result = $this->insertExtraFields();