From 52fa5df66c774b3ae59828eb5c8bb181a1fcb142 Mon Sep 17 00:00:00 2001
From: aydreeihn <adriane@enhancesoft.com>
Date: Tue, 1 May 2018 15:43:48 -0500
Subject: [PATCH] Thread Entry Action: New Ticket

- Fix to make sure tickets can be created from a User's message (not just Agents or Internal Notes)
---
 include/staff/ticket-open.inc.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php
index 591442462..2606bb736 100644
--- a/include/staff/ticket-open.inc.php
+++ b/include/staff/ticket-open.inc.php
@@ -9,11 +9,10 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 
 //  Use thread entry to seed the ticket
 if (!$user && $_GET['tid'] && ($entry = ThreadEntry::lookup($_GET['tid']))) {
+    $_SESSION[':form-data']['message'] = Format::htmlchars($entry->getBody());
     if ($entry->user_id)
        $user = User::lookup($entry->user_id);
-    else
 
-     $_SESSION[':form-data']['message'] = Format::htmlchars($entry->getBody());
      if (($m= TicketForm::getInstance()->getField('message'))) {
          $k = 'attach:'.$m->getId();
         foreach ($entry->getAttachments() as $a)
-- 
GitLab