Beispiel #1
0
 /**
  * Forward a ticket to a group, also removes the previous group where it was forwarded to.
  * It will first check if the ticket is already forwarded, if that's the case, it will delete that entry.
  * Afterwards it creates the new forward entry
  * @param $group_id the id of the support group we want to forward the ticket to.
  * @param $ticket_id the id of the ticket.
  * @return A string, if assigning succeedded "SUCCESS_FORWARDED" will be returned.
  */
 public static function forwardTicket($group_id, $ticket_id)
 {
     $dbl = new DBLayer("lib");
     if (forwarded::isForwarded($ticket_id)) {
         $forw = new Forwarded();
         $forw->load($ticket_id);
         $forw->delete();
     }
     $forward = new Forwarded();
     $forward->set(array('Group' => $group_id, 'Ticket' => $ticket_id));
     $forward->create();
     return "SUCCESS_FORWARDED";
 }
Beispiel #2
0
 /**
  * get the id of the support group to whom the ticket is forwarded
  * or return 0 in case not forwarded.
  */
 public function getForwardedGroupId()
 {
     $group_id = Forwarded::getSGroupOfTicket($this->getTId());
     if ($group_id == "") {
         return 0;
     } else {
         return $group_id;
     }
 }