diff --git a/AgentsPerQueue.sopm b/AgentsPerQueue.sopm
index 74b5167..69f4ded 100755
--- a/AgentsPerQueue.sopm
+++ b/AgentsPerQueue.sopm
@@ -1,27 +1,21 @@
AgentsPerQueue
- 1.0.3
- 3.x.x
- SeTIC
- http://www.setic.ufsc.br
- Free
- Agentes por fila
-
- Versão 1.0.0 - Versão inicial
- Versão 1.0.2 - Encaminhamentos
- Versão 1.0.3 - Ajustes de encaminhamento
-
-
- Módulo de agentes por fila instalado com sucesso!
- Agents per queue module
- Agents per queue module installed successfully!
+ 1.1.0
+ 4.0.4
+ SeTIC - UFSC
+ http://setic.ufsc.br
+ GPLv2
+ Agents per queue
+ Adjustments for OTRS 4.0.4
+ Agents per queue module
+ Agents per queue module installed successfully!??
-
+
\ No newline at end of file
diff --git a/Kernel/Config/Files/AgentsPerQueue.xml b/Kernel/Config/Files/AgentsPerQueue.xml
index 7415bca..c9366aa 100644
--- a/Kernel/Config/Files/AgentsPerQueue.xml
+++ b/Kernel/Config/Files/AgentsPerQueue.xml
@@ -1,7 +1,6 @@
-
-
+
FrontendModuleRegistration for AgentsPerQueue module.
@@ -12,8 +11,8 @@
Module for publishing agents per queue matrixService
- Agents per queue matrix
- Agents per queue matrix
+ Agents per queue matrix
+ Agents per queue matrix
Action=AgentsPerQueue
Service
diff --git a/Kernel/Language/pt_BR_AgentsPerQueue.pm b/Kernel/Language/pt_BR_AgentsPerQueue.pm
index 3412865..7a155bd 100644
--- a/Kernel/Language/pt_BR_AgentsPerQueue.pm
+++ b/Kernel/Language/pt_BR_AgentsPerQueue.pm
@@ -12,6 +12,7 @@ package Kernel::Language::pt_BR_AgentsPerQueue;
use strict;
use warnings;
+use utf8;
sub Data {
my $Self = shift;
@@ -20,10 +21,7 @@ sub Data {
$Self->{Translation}->{'Queues'} = 'Filas';
$Self->{Translation}->{'Paths'} = 'Encaminhamentos';
$Self->{Translation}->{'Agents per queue matrix'} = 'Agentes por fila';
-
-
-
-
+
return 1;
}
1;
\ No newline at end of file
diff --git a/Kernel/Modules/AgentsPerQueue.pm b/Kernel/Modules/AgentsPerQueue.pm
index 418a9bc..ee9f735 100644
--- a/Kernel/Modules/AgentsPerQueue.pm
+++ b/Kernel/Modules/AgentsPerQueue.pm
@@ -1,6 +1,9 @@
# --
# Kernel/Modules/AgentsPerQueue.pm - frontend module for displaying the agents per queue matrix panel
-# Copyright (C) 2014 (Rodrigo Goncalves) (rodrigo.g@ufsc.br)
+#
+# Copyright (C) 2014 SeTIC - UFSC - http://setic.ufsc.br/
+# Version 01/15/2015 - Adjustments for OTRS 4
+#
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
@@ -12,7 +15,15 @@ use strict;
use warnings;
use Kernel::System::VariableCheck qw(:all);
-use Data::Dumper;
+
+
+our @ObjectDependencies = (
+"Kernel::System::Web::Request", # OLD ParamObject
+"Kernel::System::DB",
+"Kernel::Output::HTML::Layout",
+"Kernel::System::Log",
+"Kernel::Config"
+);
sub new {
my ( $Type, %Param ) = @_;
@@ -21,49 +32,38 @@ sub new {
my $Self = {%Param};
bless( $Self, $Type );
- # check needed objects
- for (
- qw(ParamObject DBObject LayoutObject LogObject ConfigObject)
- )
- {
- if ( !$Self->{$_} ) {
- $Self->{LayoutObject}->FatalError( Message => "Got no $_!" );
- }
- }
-
- # needed objects
-
return $Self;
}
sub Run {
my ( $Self, %Param ) = @_;
my %Data = ();
+ my $layoutObject = $Kernel::OM->Get("Kernel::Output::HTML::Layout");
# load data
my %matrix = $Self->GetQueuesPerAgent();
# build output
my $Output =
- $Self->{LayoutObject}->Header( Title => $Self->{LayoutObject}->{LanguageObject}->Get("Queues per agent") );
- $Output .= $Self->{LayoutObject}->NavigationBar();
+ $layoutObject->Header( Title => $layoutObject->{LanguageObject}->Translate("Queues per agent") );
+ $Output .= $layoutObject->NavigationBar();
my $id = 1;
# include each agent
foreach my $agent ( sort keys %matrix ) {
- $Self->{LayoutObject}->Block(
+ $layoutObject->Block(
Name => 'QueuesPerAgent',
Data => { ID => $id, Agent => $agent, Queues => $matrix{$agent}{"Manage"}, Paths => $matrix{$agent}{"Path"} },
);
$id += 1;
}
- $Output .= $Self->{LayoutObject}->Output(
+ $Output .= $layoutObject->Output(
Data => \%Data,
TemplateFile => 'AgentsPerQueue',
);
- $Output .= $Self->{LayoutObject}->Footer();
+ $Output .= $layoutObject->Footer();
return $Output;
}
@@ -71,11 +71,12 @@ sub Run {
sub GetQueuesPerAgent {
my ( $Self, %Param ) = @_;
my %result = ();
+ my $dbObject = $Kernel::OM->Get("Kernel::System::DB");
my $SQL = "SELECT type, user, queue from vw_user_queues order by user,queue, type";
# get queues
- $Self->{DBObject}->Prepare(
+ $dbObject->Prepare(
SQL => $SQL,
Bind => [ ]
);
@@ -91,7 +92,7 @@ sub GetQueuesPerAgent {
my $agent = "";
# for each user/queue
- while ( my @row = $Self->{DBObject}->FetchrowArray() ) {
+ while ( my @row = $dbObject->FetchrowArray() ) {
# current line data
$type = $row[0];
@@ -138,8 +139,6 @@ sub GetQueuesPerAgent {
$result{$agent}{"Path"} = $queuesPath;
}
- print STDERR Dumper(%result);
-
return %result;
}
diff --git a/Kernel/Output/HTML/Standard/AgentsPerQueue.dtl b/Kernel/Output/HTML/Standard/AgentsPerQueue.dtl
deleted file mode 100644
index 86e2159..0000000
--- a/Kernel/Output/HTML/Standard/AgentsPerQueue.dtl
+++ /dev/null
@@ -1,35 +0,0 @@
-# --
-# ResponsibilityMatrix.dtl - provides HTML for ResponsibilityMatrix
-# Copyright (C) 2014 Rodrigo Gonçalves (rodrigo.g@ufsc.br)
-#
-# This software comes with ABSOLUTELY NO WARRANTY. For details, see
-# the enclosed file COPYING for license information (AGPL). If you
-# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
-# --
-# Autor: Rodrigo Gonçalves
-# Data.: 04/08/2014 - versão inicial
-#
-
-
$Text{"Queues per agent"}
-
-
-
-
$Text{"ID"}
-
$Text{"Agent"}
-
$Text{"Paths"}
-
$Text{"Queues"}
-
-
-
-
-
$Data{"ID"}
$Data{"Agent"}
-
-
$Data{"Paths"}
-
-
-
$Data{"Queues"}
-
-
-
-
-
\ No newline at end of file
diff --git a/Kernel/Output/HTML/Standard/AgentsPerQueue.tt b/Kernel/Output/HTML/Standard/AgentsPerQueue.tt
new file mode 100644
index 0000000..5874936
--- /dev/null
+++ b/Kernel/Output/HTML/Standard/AgentsPerQueue.tt
@@ -0,0 +1,36 @@
+# --
+# ResponsibilityMatrix.tt - provides HTML for ResponsibilityMatrix
+#
+# Copyright (C) 2014 SeTIC - UFSC - http://setic.ufsc.br/
+# Version 01/15/2015 - Adjustments for OTRS 4
+#
+#
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see
+# the enclosed file COPYING for license information (AGPL). If you
+# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
+# --
+#
+
+