diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 53ba83015b3..259e5a3a19a 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -436,6 +436,14 @@ class FormTicket print 'withnotifytiersatcreate ? ' checked="checked"' : '').'>'; print ''; } + + // User assigned + print ''; + print $langs->trans("AssignedTo"); + print ''; + print $form->select_dolusers(GETPOST('fk_user_assign', 'int'), 'fk_user_assign', 1); + print ''; + print ''; } if (!empty($conf->projet->enabled) && !$this->ispublic) { diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index f64b6e28fd1..8a11ac23e23 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -188,6 +188,11 @@ if (empty($reshook)) { $object->email_from = $user->email; $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); $object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1; + $fk_user_assign = GETPOST("fk_user_assign", 'int'); + if ($fk_user_assign > 0) { + $object->fk_user_assign = $fk_user_assign; + $object->fk_statut = $object::STATUS_ASSIGNED; + } $object->fk_project = $projectid;