From 49de4dcda69c97d4162d32322a9b9a63089ec935 Mon Sep 17 00:00:00 2001 From: Manny Isles Date: Mon, 19 Dec 2022 15:37:35 +0800 Subject: [PATCH 1/2] I think it should be $obj->rowid I think it should be $obj->rowid because when its `$obj->id` then it goes nowhere. --- htdocs/accountancy/admin/subaccount.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index c9f78596bcd..4f2274269d8 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -408,7 +408,7 @@ if ($resql) { $s .= ''.$langs->trans("Supplier").''; } elseif ($obj->type == 3) { // User - $s .= ''.$langs->trans("Employee").''; + $s .= ''.$langs->trans("Employee").''; } print $s; print ''; From 6890b18189c453d8485a92d939be34cf125a5ba6 Mon Sep 17 00:00:00 2001 From: kkhelifa Date: Tue, 20 Dec 2022 11:54:02 +0100 Subject: [PATCH 2/2] NEW : set ticket status to answered if the client has answered from the public interface --- htdocs/ticket/class/ticket.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 2a3160b3b67..ca78b2fc2fe 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2677,7 +2677,10 @@ class Ticket extends CommonObject } // Set status to "answered" if not set yet, but only if internal user and not private message - if ($object->status < 3 && !$user->socid && !$private) { + // Or set status to "answered" if the client has answered and if the ticket has started + if (($object->status < self::STATUS_IN_PROGRESS && !$user->socid && !$private) || + ($object->status > self::STATUS_IN_PROGRESS && $public_area) + ) { $object->setStatut(3); } return 1;