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.