diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php
index f4e5b4f3fad..fc8a5e8e0b9 100644
--- a/htdocs/admin/ticket.php
+++ b/htdocs/admin/ticket.php
@@ -143,6 +143,20 @@ if ($action == 'updateMask') {
}
}
+if ($action == 'setvarworkflow') {
+ $param_auto_read = GETPOST('TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', 'alpha');
+ $res = dolibarr_set_const($db, 'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', $param_auto_read, 'chaine', 0, '', $conf->entity);
+ if (!($res > 0)) {
+ $error++;
+ }
+
+ $param_auto_assign = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha');
+ $res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity);
+ if (!($res > 0)) {
+ $error++;
+ }
+}
+
if ($action == 'setvarother') {
$param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity);
@@ -177,12 +191,6 @@ if ($action == 'setvarother') {
if (!($res > 0)) {
$error++;
}
-
- $param_auto_assign = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha');
- $res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity);
- if (!($res > 0)) {
- $error++;
- }
}
@@ -467,7 +475,7 @@ print '
';
if (!$conf->use_javascript_ajax) {
print '