get all the values from the matrix
This commit is contained in:
parent
d7cdae5841
commit
ae0ffa811f
|
@ -68,6 +68,7 @@ class TicketService {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* matrixTicketContent has all the syncronized data
|
||||||
* @param MatrixTicket $ticket the database object.
|
* @param MatrixTicket $ticket the database object.
|
||||||
* @return array a JSON serializable representation of the resolved ticket, for the frontend.
|
* @return array a JSON serializable representation of the resolved ticket, for the frontend.
|
||||||
*/
|
*/
|
||||||
|
@ -79,11 +80,8 @@ 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 = array_get($matrixTicketContent, "matrixHelperUserName", "nicht zugewiesen");
|
||||||
$matrixHelperUserName = $matrixHelperUser ? "Helfer Name" : "nicht zugewiesen";
|
$expirationDate = array_get($matrixTicketContent, "expiration date", "");
|
||||||
//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(),
|
||||||
|
|
Loading…
Reference in a new issue