1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-24 11:22:42 +01:00

set closed_at if conversation is closed after reply

This commit is contained in:
Tillmann Baumgart 2020-12-16 22:39:07 +01:00
parent 608e6e7a1d
commit 49df4425ea

View File

@ -648,6 +648,11 @@ class ConversationsController extends Controller
$prev_status = $conversation->status;
$conversation->status = $request->status;
if (Conversation::STATUS_CLOSED === $conversation->status) {
$conversation->closed_by_user_id = $request->user_id;
$conversation->closed_at = date('Y-m-d H:i:s');
}
// We need to set state, as it may have been a draft
$conversation->state = Conversation::STATE_PUBLISHED;
// Set assignee