From d34f9378c516b192fce37653968bbe75650a2532 Mon Sep 17 00:00:00 2001 From: Quitta Date: Mon, 22 Jul 2013 20:33:34 +0200 Subject: [PATCH] updated logging, when ticket is assigned/unassigned or forwarded, then it will be logged! --- .../server/ryzom_ams/ams_lib/autoload/ticket.php | 12 +++++++++--- .../server/ryzom_ams/ams_lib/autoload/ticket_log.php | 3 +++ .../server/ryzom_ams/ams_lib/translations/en.ini | 3 +++ .../server/ryzom_ams/ams_lib/translations/fr.ini | 3 +++ .../ryzom_ams/www/html/inc/show_ticket_log.php | 2 ++ .../ryzom_ams/www/html/templates/show_queue.tpl | 6 +++--- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php index 8a1251de4..6595f2bc7 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php @@ -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"; } diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_log.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_log.php index 5e6f4018a..1d1b90a44 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_log.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_log.php @@ -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 * ****************************************/ diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini index 3d610875a..f8f32b5e2 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini @@ -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
Found!" diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini index a7aeb36cf..87d47245a 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini @@ -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
trouvez!" diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket_log.php b/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket_log.php index 6cdf45b9a..4ce581234 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket_log.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket_log.php @@ -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 = "" . Support_Group::getGroup($log['argument'])->getName() . ""; } $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']); diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl index 43bd193fb..acce61b02 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/show_queue.tpl @@ -57,13 +57,13 @@ {$ticket.category} {if $ticket.status eq 0} {/if} {$ticket.statusText} - + {if $ticket.forwardedGroupName eq "0"} {$public_sgroup} {else} - {$ticket.forwardedGroupName} + {$ticket.forwardedGroupName} {/if} - + {if $ticket.assigned eq 0}