Possible bug in ticket status upon user edit?

  • CLAW Corp
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #147476 by CLAW Corp
When a user edits a ticket, the status does not get set to $config->ticket_status_when_customer_add_comment because $data is undefined. This occur when using the email link for unauthenticated edits. I have not tested against authenticated. Here's the patch I've applied on our end:

ndex: Ticket.php
===================================================================
--- Ticket.php    (revision 930)
+++ Ticket.php    (working copy)
@@ -587,7 +587,9 @@
 
         $row->store();
 
-        if ($row->user_id == $ticket->user_id || isset($data))
+        $tmpdata = $input->getData(false);
+
+        if ($row->user_id == $ticket->user_id || isset($tmpdata))
         {
             $isCustomerAddComment = true;
         }
@@ -602,7 +604,9 @@
         }
         elseif ($isCustomerAddComment)
         {
-            $ticket->status_id = $config->ticket_status_when_customer_add_comment;
+            if ( $ticket->status_id != $config->new_ticket_status_id) {
+                $ticket->status_id = $config->ticket_status_when_customer_add_comment;
+            }
         }
         else
         {

The second edit could be skipped. We don't want a new ticket to have anything other than new, even if a user edits (they might be providing more information).

Thank you.

Please Log in or Create an account to join the conversation.

More
3 years 1 month ago #147496 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Possible bug in ticket status upon user edit?
Hello

Could you please give us more information about this. Exactly what's user edit ticket? And how it happens?

Could you please let us know step by step what we need to do to see this case so that I can check this further?

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • CLAW Corp
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #147505 by CLAW Corp
Replied by CLAW Corp on topic Possible bug in ticket status upon user edit?
I created a step-by-step doc with some debugging info:

docs.google.com/document/d/1g7SyOwYdTiWq...-4g/edit?usp=sharing

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc