From 002778db5ef130eead34559c29fe4e25106e6827 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Fri, 18 Jan 2019 17:36:13 +0100 Subject: [PATCH] fix(targetticket): email field as source of actors actors field is not allowed for anonymous forms, then allow email field to be used to populate requester, observer or assigned Signed-off-by: Thierry Bugier --- inc/targetticket.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/targetticket.class.php b/inc/targetticket.class.php index e958d9222..0bac4b1d7 100644 --- a/inc/targetticket.class.php +++ b/inc/targetticket.class.php @@ -225,7 +225,7 @@ public function showForm($options = []) { WHERE s.id = {$section['id']} AND ((q.fieldtype = 'glpiselect' AND q.values IN ('User', 'Group', 'Supplier')) - OR (q.fieldtype = 'actor'))"; + OR (q.fieldtype IN ('actor', 'email')))"; $result2 = $DB->query($query2); $section_questions_user = []; $section_questions_group = []; @@ -246,6 +246,8 @@ public function showForm($options = []) { } } else if ($question['fieldtype'] == 'actor') { $section_questions_actors[$question['id']] = $question['name']; + } else if ($question['fieldtype'] == 'email') { + $section_questions_user[$question['id']] = $question['name']; } } $questions_user_list[$section['name']] = $section_questions_user;