From f6f164893eec75842ae68d4acf1f17a793c1860c Mon Sep 17 00:00:00 2001 From: Hans <70293671+Dolisupport@users.noreply.github.com> Date: Wed, 7 Oct 2020 16:45:06 +0200 Subject: [PATCH 1/2] Update ticket.class.php --- htdocs/ticket/class/ticket.class.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 9076a236978..04abd650032 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -142,6 +142,26 @@ class Ticket extends CommonObject */ public $severity_code; + /** + * Type label + */ + public $type_label; + + /** + * Category label + */ + public $category_label; + + /** + * Severity label + */ + public $severity_label; + + /** + * Email from user + */ + public $email_from; + /** * @var int Création date */ From 57acfb738fa1ab7ad4ea365523e49e0f711b0d9c Mon Sep 17 00:00:00 2001 From: Hans <70293671+Dolisupport@users.noreply.github.com> Date: Wed, 7 Oct 2020 16:48:50 +0200 Subject: [PATCH 2/2] Update card.php --- htdocs/ticket/card.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 1719013bdf5..e4474731829 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -170,8 +170,12 @@ if (empty($reshook)) { $object->message = GETPOST("message", 'restricthtml'); $object->type_code = GETPOST("type_code", 'alpha'); + $object->type_label = $langs->trans($langs->getLabelFromKey($db, $object->type_code, 'c_ticket_type', 'code', 'label')); $object->category_code = GETPOST("category_code", 'alpha'); + $object->category_label = $langs->trans($langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label')); $object->severity_code = GETPOST("severity_code", 'alpha'); + $object->severity_label = $langs->trans($langs->getLabelFromKey($db, $object->severity_code, 'c_ticket_severity', 'code', 'label')); + $object->email_from = $user->email; $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); $object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1;