mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-14 11:19:07 +00:00
in the show queue, it also shows the assigned users name :)
This commit is contained in:
parent
d1fe49fc7b
commit
ff7db2a28c
6 changed files with 25 additions and 1 deletions
|
@ -20,6 +20,17 @@ class Assigned{
|
|||
return "ALREADY_ASSIGNED";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Get the id of the user assigned to a ticket
|
||||
public static function getUserAssignedToTicket($ticket_id) {
|
||||
$dbl = new DBLayer("lib");
|
||||
$statement = $dbl->execute("SELECT ticket_user.ExternId FROM `assigned` JOIN `ticket_user` ON assigned.User = ticket_user.TUserId WHERE `Ticket` = :ticket_id", Array('ticket_id' => $ticket_id));
|
||||
$user_id = $statement->fetch();
|
||||
return $user_id['ExternId'];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static function isAssigned( $ticket_id ) {
|
||||
|
|
|
@ -234,6 +234,14 @@ class Ticket{
|
|||
return $priorityArray[$this->getPriority()];
|
||||
}
|
||||
|
||||
public function getAssigned(){
|
||||
$user_id = Assigned::getUserAssignedToTicket($this->getTId());
|
||||
if ($user_id == ""){
|
||||
return 0;
|
||||
}else{
|
||||
return $user_id;
|
||||
}
|
||||
}
|
||||
////////////////////////////////////////////Setters////////////////////////////////////////////////////
|
||||
|
||||
public function setTId($id){
|
||||
|
|
|
@ -30,6 +30,7 @@ t_send = "Send reply"
|
|||
[show_user]
|
||||
|
||||
[show_queue]
|
||||
not_assigned = "None"
|
||||
|
||||
[show_sgroup]
|
||||
add_to_group_success = "The user has been added to the group!"
|
||||
|
|
|
@ -30,6 +30,7 @@ t_send = "Envoyer la reponse"
|
|||
[show_user]
|
||||
|
||||
[show_queue]
|
||||
not_assigned = "Ne pas"
|
||||
|
||||
[show_sgroup]
|
||||
add_to_group_success = "ce user est ajoute sur la groupe!"
|
||||
|
|
|
@ -9,11 +9,12 @@ function show_queue(){
|
|||
|
||||
$queueArray = Ticket_Queue_Handler::getTickets($result['queue_action']);
|
||||
if ($queueArray != "ERROR"){
|
||||
$result['tickets'] = Gui_Elements::make_table($queueArray, Array("getTId","getTitle","getTimestamp","getAuthor()->getExternId","getTicket_Category()->getName","getStatus","getStatusText"), Array("tId","title","timestamp","authorExtern","category","status","statusText"));
|
||||
$result['tickets'] = Gui_Elements::make_table($queueArray, Array("getTId","getTitle","getTimestamp","getAuthor()->getExternId","getTicket_Category()->getName","getStatus","getStatusText","getAssigned"), Array("tId","title","timestamp","authorExtern","category","status","statusText","assigned"));
|
||||
|
||||
$i = 0;
|
||||
foreach( $result['tickets'] as $ticket){
|
||||
$result['tickets'][$i]['author'] = WebUsers::getUsername($ticket['authorExtern']);
|
||||
$result['tickets'][$i]['assignedText'] = WebUsers::getUsername($ticket['assigned']);
|
||||
$i++;
|
||||
}
|
||||
if(Ticket_User::isMod($_SESSION['ticket_user'])){
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Title</th>
|
||||
<th>Assigned</th>
|
||||
<th>Timestamp</th>
|
||||
<th>Category</th>
|
||||
<th>Status</th>
|
||||
|
@ -26,6 +27,7 @@
|
|||
<tr>
|
||||
<td>{$ticket.tId}</td>
|
||||
<td><a href ="index.php?page=show_ticket&id={$ticket.tId}">{$ticket.title}</a></td>
|
||||
<td>{if $ticket.assignedText neq ""} <a href="index.php?page=show_user&id={$ticket.assigned}">{$ticket.assignedText}</a> {else}<i> {$not_assigned}</i> {/if}</td>
|
||||
<td class="center"><i>{$ticket.timestamp}</i></td>
|
||||
<td class="center">{$ticket.category}</td>
|
||||
|
||||
|
|
Loading…
Reference in a new issue