added expiration date and helper to resolveTicket
This commit is contained in:
parent
23e4f0c974
commit
6de894487c
|
@ -79,12 +79,20 @@ class TicketService {
|
||||||
$title = array_get($matrixTicketContent, "title", "Untitled");
|
$title = array_get($matrixTicketContent, "title", "Untitled");
|
||||||
$description = array_get($matrixTicketContent, "description", "");
|
$description = array_get($matrixTicketContent, "description", "");
|
||||||
$lastModified = $this->matrix->getLastEventDate($ticket->getMatrixRoom());
|
$lastModified = $this->matrix->getLastEventDate($ticket->getMatrixRoom());
|
||||||
|
$matrixHelperUser = $ticket->getMatrixHelperUser();
|
||||||
|
$matrixHelperUserName = $matrixHelperUser ? "Helfer Name" : "nicht zugewiesen";
|
||||||
|
//FIXME : set $maxHelpTime somewhere as an option or at least available for other functions
|
||||||
|
$maxHelpTime = 7 * 24 * 60 * 60 * 1000;
|
||||||
|
$expirationDate = $lastModified + $maxHelpTime;
|
||||||
return array(
|
return array(
|
||||||
'ticketId' => $ticketId,
|
'ticketId' => $ticketId,
|
||||||
'status' => $ticket->getStatus(),
|
'status' => $ticket->getStatus(),
|
||||||
'lastModified' => $lastModified,
|
'lastModified' => $lastModified,
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
'description' => $description,
|
'description' => $description,
|
||||||
|
'matrixHelperUser' => $matrixHelperUser,
|
||||||
|
'matrixHelferName' => $matrixHelperUserName,
|
||||||
|
'expirationDate' => $expirationDate
|
||||||
);
|
);
|
||||||
} catch (MatrixException | RoomNotFoundException $e) {
|
} catch (MatrixException | RoomNotFoundException $e) {
|
||||||
return array(
|
return array(
|
||||||
|
|
Loading…
Reference in a new issue