updated logging, when ticket is assigned/unassigned or forwarded, then it will be logged!
--HG-- branch : quitta-gsoc-2013
This commit is contained in:
parent
63666aef9b
commit
6887ee889e
6 changed files with 23 additions and 6 deletions
|
@ -147,7 +147,9 @@ class Ticket{
|
|||
//returns SUCCESS_ASSIGNED, TICKET_NOT_EXISTING or ALREADY_ASSIGNED
|
||||
public static function assignTicket($user_id, $ticket_id){
|
||||
if(self::ticketExists($ticket_id)){
|
||||
return Assigned::assignTicket($user_id, $ticket_id);
|
||||
$returnvalue = Assigned::assignTicket($user_id, $ticket_id);
|
||||
Ticket_Log::createLogEntry( $ticket_id, $user_id, 7);
|
||||
return $returnvalue;
|
||||
}else{
|
||||
return "TICKET_NOT_EXISTING";
|
||||
}
|
||||
|
@ -156,7 +158,9 @@ class Ticket{
|
|||
//returns SUCCESS_UNASSIGNED, TICKET_NOT_EXISTING or NOT_ASSIGNED
|
||||
public static function unAssignTicket($user_id, $ticket_id){
|
||||
if(self::ticketExists($ticket_id)){
|
||||
return Assigned::unAssignTicket($user_id, $ticket_id);
|
||||
$returnvalue = Assigned::unAssignTicket($user_id, $ticket_id);
|
||||
Ticket_Log::createLogEntry( $ticket_id, $user_id, 9);
|
||||
return $returnvalue;
|
||||
}else{
|
||||
return "TICKET_NOT_EXISTING";
|
||||
}
|
||||
|
@ -165,7 +169,9 @@ class Ticket{
|
|||
public static function forwardTicket($user_id, $ticket_id, $group_id){
|
||||
if(self::ticketExists($ticket_id)){
|
||||
if(isset($group_id) && $group_id != ""){
|
||||
return Forwarded::forwardTicket($group_id, $ticket_id);
|
||||
$returnvalue = Forwarded::forwardTicket($group_id, $ticket_id);
|
||||
Ticket_Log::createLogEntry( $ticket_id, $user_id, 8, $group_id);
|
||||
return $returnvalue;
|
||||
}else{
|
||||
return "INVALID_SGROUP";
|
||||
}
|
||||
|
|
|
@ -16,6 +16,9 @@ class Ticket_Log{
|
|||
* 4: Added Reply ID: arg to ticket
|
||||
* 5: Changed status to arg
|
||||
* 6: Changed Priority to arg
|
||||
* 7: assigned to the ticket
|
||||
* 8: Forwarded ticket to support group arg
|
||||
* 9: unassigned to the ticket
|
||||
*
|
||||
****************************************/
|
||||
|
||||
|
|
|
@ -68,6 +68,9 @@ group_size_error = "The name has to be between 4-20 chars and the tag between 2-
|
|||
4 = "added reply"
|
||||
5 = "changed the status to"
|
||||
6 = "changed the priority to"
|
||||
7 = "assigned to the ticket"
|
||||
8 = "forwarded the ticket to the support group: "
|
||||
9 = "unassigned from the ticket"
|
||||
|
||||
[error]
|
||||
title404 = "Not<br/>Found!"
|
||||
|
|
|
@ -68,6 +68,9 @@ group_size_error = "le nom doit etre 4-20 chars et le tag 2-4!"
|
|||
4 = "a ajoute le reponse"
|
||||
5 = "change le status a"
|
||||
6 = "change le priorite a"
|
||||
7 = "assigne ce billet a ce meme"
|
||||
8 = "a eenvoyee ce ticket a la groupe de support:"
|
||||
|
||||
|
||||
[error]
|
||||
title404 = "Pas<br/>trouvez!"
|
||||
|
|
|
@ -28,6 +28,8 @@ function show_ticket_log(){
|
|||
}else if($log['action'] == 6){
|
||||
$priorityArray = Ticket::getPriorityArray();
|
||||
$query_backpart = $priorityArray[$log['argument'] ];
|
||||
}else if($log['action'] == 8){
|
||||
$query_backpart = "<a href='index.php?page=show_sgroupy&id=" . $log['argument'] . "'>" . Support_Group::getGroup($log['argument'])->getName() . "</a>";
|
||||
}
|
||||
$result['ticket_logs'][$i]['query'] = $author . " " . $log_action_array[$log['action']] . " " . $query_backpart;
|
||||
$result['ticket_logs'][$i]['timestamp_elapsed'] = Gui_Elements::time_elapsed_string($log['timestamp']);
|
||||
|
|
|
@ -57,13 +57,13 @@
|
|||
<td class="center">{$ticket.category}</td>
|
||||
<td class="center"><span class="label {if $ticket.status eq 0}label-success{else if $ticket.status eq 1}label-warning{else if $ticket.status eq 2}label-important{/if}">{if $ticket.status eq 0} <i class="icon-exclamation-sign icon-white"></i>{/if} {$ticket.statusText}</span></td>
|
||||
<td class="center">
|
||||
<span class="label label-info">
|
||||
|
||||
{if $ticket.forwardedGroupName eq "0"}
|
||||
<i>{$public_sgroup}</i>
|
||||
{else}
|
||||
<a href="index.php?page=show_sgroup&id={$ticket.forwardedGroupId}"><font color="white">{$ticket.forwardedGroupName}</font></a>
|
||||
<span class="label label-info"><a href="index.php?page=show_sgroup&id={$ticket.forwardedGroupId}"><font color="white">{$ticket.forwardedGroupName}</font></a></span>
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{if $ticket.assigned eq 0}
|
||||
|
|
Loading…
Reference in a new issue