diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php index 0506d24471843024c5e212434543335e6adfaf0a..458e430ea83192703bea52c026413af63c4edb63 100644 --- a/include/ajax.tickets.php +++ b/include/ajax.tickets.php @@ -231,7 +231,7 @@ class TicketsAjaxAPI extends AjaxController { <tr> <th width="100">Assigned To:</th> <td>%s</td> - </tr>',$ticket->isAssigned()?$ticket->getAssignee():' <span class="faded">— Unassigned —</span>'); + </tr>',$ticket->isAssigned()?implode('/', $ticket->getAssignees()):' <span class="faded">— Unassigned —</span>'); } echo sprintf( ' <tr> diff --git a/include/class.ticket.php b/include/class.ticket.php index 0ad4ab2f366b1dd05e3ba322f177f1656ec85560..b0f54d2c761461ba987b0e4f91f86ad276d0290e 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -398,12 +398,12 @@ class Ticket{ function getAssignees() { - $assignees=''; + $assignees=array(); if($staff=$this->getStaff()) - $assignees.=$staff->getName(); + $assignees[] = $staff->getName(); if($team=$this->getTeam()) - $assignees.=$team->getName(); + $assignees[] = $team->getName(); return $assignees; } diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index f158a387b518a9996af30f6669016e936f7bdecb..33f46eadd443ccf0cda94867d0e54a924b73e30e 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -21,7 +21,7 @@ $id = $ticket->getId(); //Ticket ID. //Useful warnings and errors the user might want to know! if($ticket->isAssigned() && $staff->getId()!=$thisstaff->getId()) - $warn.=' <span class="Icon assignedTicket">Ticket is assigned to '.$ticket->getAssignee().'</span>'; + $warn.=' <span class="Icon assignedTicket">Ticket is assigned to '.implode('/', $ticket->getAssignees()).'</span>'; if(!$errors['err'] && ($lock && $lock->getStaffId()!=$thisstaff->getId())) $errors['err']='This ticket is currently locked by '.$lock->getStaffName(); if(!$errors['err'] && ($emailBanned=EmailFilter::isBanned($ticket->getEmail()))) @@ -103,10 +103,34 @@ if($ticket->isOverdue()) <tr> <td width="50%"> <table cellspacing="0" cellpadding="4" width="100%" border="0"> + <?php + if($ticket->isOpen()) { ?> <tr> <th width="100">Assigned To:</th> - <td><?php echo Format::htmlchars($ticket->getAssignee()); ?></td> + <td> + <?php + if($ticket->isAssigned()) + echo Format::htmlchars(implode('/', $ticket->getAssignees())); + else + echo '<span class="faded">— Unassigned —</span>'; + ?> + </td> </tr> + <?php + } else { ?> + <tr> + <th width="100">Closed By:</th> + <td> + <?php + if(($staff = $ticket->getStaff())) + echo Format::htmlchars($staff->getName()); + else + echo '<span class="faded">— Unknown —</span>'; + ?> + </td> + </tr> + <?php + } ?> <tr> <th nowrap>Last Response:</th> <td><?php echo Format::db_datetime($ticket->getLastRespDate()); ?></td>