diff --git a/inc/ticket.class.php b/inc/ticket.class.php index 010f7076..ab34ded4 100644 --- a/inc/ticket.class.php +++ b/inc/ticket.class.php @@ -759,20 +759,18 @@ static function cloneAndLink($tickets_id) { //add actors to the new ticket (without assign) //users - $res = $DB->insert('glpi_tickets_user', [ - new QuerySubQuery([ - 'SELECT' => [ - new QueryExpression("'' AS " . $DB::quoteName('id')), - new QueryExpression($DB::quoteValue($newID) . " AS " . $DB::quoteName('tickets_id')), - 'users_id', 'type', 'use_notification', 'alternative_email' - ], - 'FROM' => 'glpi_tickets_users', - 'WHERE' => [ - 'tickets_id' => $tickets_id, - 'type' => ['!=', 2] - ] - ]) - ]); + $res = $DB->insert('glpi_tickets_user', new QuerySubQuery([ + 'SELECT' => [ + new QueryExpression("'' AS " . $DB::quoteName('id')), + new QueryExpression($DB::quoteValue($newID) . " AS " . $DB::quoteName('tickets_id')), + 'users_id', 'type', 'use_notification', 'alternative_email' + ], + 'FROM' => 'glpi_tickets_users', + 'WHERE' => [ + 'tickets_id' => $tickets_id, + 'type' => ['!=', 2] + ] + ])); if (!$res) { echo "{\"success\":false, \"message\":\"".__("Error : adding actors (user)", "escalade")."\"}"; exit;