Merge pull request #19901 from thomas-Ngr/develop_new_auto_read_ticket

NEW allow a ticket to be automatically marked as read
This commit is contained in:
Laurent Destailleur 2022-01-23 12:05:24 +01:00 committed by GitHub
commit 0e75d024a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

7
htdocs/ticket/card.php Normal file → Executable file
View File

@ -243,6 +243,13 @@ if (empty($reshook)) {
$object->setProject($projectid);
}
// Auto mark as read if created from backend
if (!empty($conf->global->TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND) && $user->rights->ticket->write) {
if ( ! $object->markAsRead($user) > 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
// Auto assign user
if (!empty($conf->global->TICKET_AUTO_ASSIGN_USER_CREATE)) {
$result = $object->assignUser($user, $user->id, 1);