Guillermo - staff-get-all-tickets[skip ci]
This commit is contained in:
parent
1f7efd4086
commit
66281df491
|
@ -35,9 +35,16 @@ class AssignStaffController extends Controller {
|
|||
$this->user->sharedTicketList->add($this->ticket);
|
||||
$this->ticket->owner = $this->user;
|
||||
$this->ticket->unread = true;
|
||||
$event = Ticketevent::getEvent(Ticketevent::ASSIGN);
|
||||
$event->setProperties(array(
|
||||
'authorStaff' => Controller::getLoggedUser(),
|
||||
'date' => Date::getCurrentDate()
|
||||
));
|
||||
$this->ticket->addEvent($event);
|
||||
|
||||
$this->ticket->store();
|
||||
$this->user->store();
|
||||
|
||||
|
||||
Response::respondSuccess();
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,13 @@ class UnAssignStaffController extends Controller {
|
|||
$user->store();
|
||||
$ticket->owner = null;
|
||||
$ticket->unread = true;
|
||||
$event = Ticketevent::getEvent(Ticketevent::UN_ASSIGN);
|
||||
$event->setProperties(array(
|
||||
'authorStaff' => Controller::getLoggedUser(),
|
||||
'date' => Date::getCurrentDate()
|
||||
));
|
||||
|
||||
$ticket->addEvent($event);
|
||||
$ticket->store();
|
||||
Response::respondSuccess();
|
||||
} else {
|
||||
|
|
|
@ -33,6 +33,13 @@ class ChangeDepartmentController extends Controller {
|
|||
return;
|
||||
}
|
||||
|
||||
$event = Ticketevent::getEvent(Ticketevent::DEPARTMENT_CHANGED);
|
||||
$event->setProperties(array(
|
||||
'authorStaff' => Controller::getLoggedUser(),
|
||||
'content' => $department->name,
|
||||
'date' => Date::getCurrentDate()
|
||||
));
|
||||
$ticket->addEvent($event);
|
||||
$ticket->department = $department;
|
||||
$ticket->unread = true;
|
||||
$ticket->store();
|
||||
|
|
|
@ -29,6 +29,13 @@ class ChangePriorityController extends Controller {
|
|||
if($ticket->owner && $user->id === $ticket->owner->id) {
|
||||
$ticket->priority = $priority;
|
||||
$ticket->unread = true;
|
||||
$event = Ticketevent::getEvent(Ticketevent::PRIORITY_CHANGED);
|
||||
$event->setProperties(array(
|
||||
'authorStaff' => Controller::getLoggedUser(),
|
||||
'content' => $ticket->priority,
|
||||
'date' => Date::getCurrentDate()
|
||||
));
|
||||
$ticket->addEvent($event);
|
||||
$ticket->store();
|
||||
Response::respondSuccess();
|
||||
} else {
|
||||
|
|
|
@ -37,6 +37,13 @@ class CloseController extends Controller {
|
|||
} else {
|
||||
$ticket->unreadStaff = true;
|
||||
}
|
||||
$event = Ticketevent::getEvent(Ticketevent::CLOSE);
|
||||
$event->setProperties(array(
|
||||
'authorStaff' => Controller::getLoggedUser(),
|
||||
'date' => Date::getCurrentDate()
|
||||
));
|
||||
|
||||
$ticket->addEvent($event);
|
||||
$ticket->closed = true;
|
||||
$ticket->store();
|
||||
Response::respondSuccess();
|
||||
|
|
|
@ -35,6 +35,12 @@ class ReOpenController extends Controller {
|
|||
} else {
|
||||
$ticket->unreadStaff = true;
|
||||
}
|
||||
$event = Ticketevent::getEvent(Ticketevent::RE_OPEN);
|
||||
$event->setProperties(array(
|
||||
'authorUser' => Controller::getLoggedUser(),
|
||||
'date' => Date::getCurrentDate()
|
||||
));
|
||||
$ticket->addEvent($event);
|
||||
$ticket->closed = false;
|
||||
$ticket->store();
|
||||
Response::respondSuccess();
|
||||
|
|
Loading…
Reference in New Issue