- Posts: 9
- Thank you received: 0
Possible bug in ticket status upon user edit?
- CLAW Corp
- Topic Author
- Offline
- New Member
Less
More
3 years 1 month ago #147476
by CLAW Corp
Possible bug in ticket status upon user edit? was created 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.
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.
- Tuan Pham Ngoc
- Offline
- Administrator
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
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
Less
More
- Posts: 9
- Thank you received: 0
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
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
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.