Commit 44efb05c95de2fb4b493d13ef756764eaf9eae80

Authored by Rodrigo Gonçalves
1 parent ac5bff09
Exists in master

Ajustes para OTRS 5.0.x

AgentsPerQueue.sopm
1 1 <?xml version="1.0" encoding="utf-8" ?>
2 2 <otrs_package version="1.0">
3 3 <Name>AgentsPerQueue</Name>
4   - <Version>1.1.0</Version>
5   - <Framework>4.0.x</Framework>
  4 + <Version>1.2.0</Version>
  5 + <Framework>5.0.x</Framework>
6 6 <Vendor>SeTIC - UFSC</Vendor>
7 7 <URL>http://setic.ufsc.br</URL>
8 8 <License>GPLv2</License>
9 9 <Description>Agents per queue</Description>
  10 + <ChangeLog Version="1.2.0">Adjustments for OTRS 5.0.x</ChangeLog>
10 11 <ChangeLog Version="1.1.0">Adjustments for OTRS 4.0.4</ChangeLog>
11 12 <Description>Agents per queue module</Description>
12 13 <IntroInstall Type="post" Title="Thank you">Agents per queue module installed successfully!</IntroInstall>
... ... @@ -16,6 +17,6 @@
16 17 <File Permission="644" Location="Kernel/Config/Files/AgentsPerQueue.xml"></File>
17 18 <File Permission="644" Location="Kernel/Language/pt_BR_AgentsPerQueue.pm"></File>
18 19 <File Permission="644" Location="Kernel/Modules/AgentsPerQueue.pm"></File>
19   - <File Permission="644" Location="Kernel/Output/HTML/Standard/AgentsPerQueue.tt"></File>
  20 + <File Permission="644" Location="Kernel/Output/HTML/Templates/Standard/AgentsPerQueue.tt"></File>
20 21 </Filelist>
21 22 </otrs_package>
22 23 \ No newline at end of file
... ...
CreateOpm.sh
1 1 #!/bin/bash
2 2 LOCAL="$PWD"
3   -cd /opt/otrs/bin
4   -./otrs.PackageManager.pl -a build -p "$LOCAL"/AgentsPerQueue.sopm -o "$LOCAL"/
  3 +cd /opt/otrs
  4 +bin/otrs.Console.pl Dev::Package::Build "$LOCAL"/AgentsPerQueue.sopm "$LOCAL"/
5 5 cd $LOCAL
... ...
Kernel/Output/HTML/Standard/AgentsPerQueue.tt
... ... @@ -1,36 +0,0 @@
1   -# --
2   -# ResponsibilityMatrix.tt - provides HTML for ResponsibilityMatrix
3   -#
4   -# Copyright (C) 2014 SeTIC - UFSC - http://setic.ufsc.br/
5   -# Version 01/15/2015 - Adjustments for OTRS 4
6   -#
7   -#
8   -# This software comes with ABSOLUTELY NO WARRANTY. For details, see
9   -# the enclosed file COPYING for license information (AGPL). If you
10   -# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
11   -# --
12   -#
13   -
14   -<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst"><h1>[% Translate("Queues per agent") | html %]</h1></div>
15   -<table class="DataTable SpacingTop" style="width: 80%; margin-left: 10%; margin-bottom: 50px;">
16   -<thead>
17   -<tr>
18   -<th ROWSPAN="1" style="text-align: center; vertical-align: middle">[% Translate("ID") | html %]</th>
19   -<th ROWSPAN="1" style="text-align: center; vertical-align: middle">[% Translate("Agent") | html %]</th>
20   -<th ROWSPAN="1" style="text-align: center; vertical-align: middle">[% Translate("Paths") | html %]</th>
21   -<th ROWSPAN="1" style="text-align: center; vertical-align: middle">[% Translate("Queues") | html %]</th>
22   -</tr>
23   -</thead>
24   -<tbody>
25   -[% RenderBlockStart("QueuesPerAgent") %]
26   -<tr><td>[% Data.ID %]</td><td>[% Data.Agent %]</td>
27   -<td>
28   -<div style="width:100%; max-height:200px; overflow:auto">[% Data.Paths %]</div>
29   -</td>
30   -<td>
31   -<div style="width:100%; max-height:200px; overflow:auto">[% Data.Queues %]</div>
32   -</td>
33   -</tr>
34   -[% RenderBlockEnd("QueuesPerAgent") %]
35   -</tbody>
36   -</table>
37 0 \ No newline at end of file
Kernel/Output/HTML/Templates/Standard/AgentsPerQueue.tt 0 → 100644
... ... @@ -0,0 +1,36 @@
  1 +# --
  2 +# ResponsibilityMatrix.tt - provides HTML for ResponsibilityMatrix
  3 +#
  4 +# Copyright (C) 2014 SeTIC - UFSC - http://setic.ufsc.br/
  5 +# Version 01/15/2015 - Adjustments for OTRS 4
  6 +#
  7 +#
  8 +# This software comes with ABSOLUTELY NO WARRANTY. For details, see
  9 +# the enclosed file COPYING for license information (AGPL). If you
  10 +# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
  11 +# --
  12 +#
  13 +
  14 +<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst"><h1>[% Translate("Queues per agent") | html %]</h1></div>
  15 +<table class="DataTable SpacingTop" style="width: 80%; margin-left: 10%; margin-bottom: 50px;">
  16 +<thead>
  17 +<tr>
  18 +<th ROWSPAN="1" style="text-align: center; vertical-align: middle">[% Translate("ID") | html %]</th>
  19 +<th ROWSPAN="1" style="text-align: center; vertical-align: middle">[% Translate("Agent") | html %]</th>
  20 +<th ROWSPAN="1" style="text-align: center; vertical-align: middle">[% Translate("Paths") | html %]</th>
  21 +<th ROWSPAN="1" style="text-align: center; vertical-align: middle">[% Translate("Queues") | html %]</th>
  22 +</tr>
  23 +</thead>
  24 +<tbody>
  25 +[% RenderBlockStart("QueuesPerAgent") %]
  26 +<tr><td>[% Data.ID %]</td><td>[% Data.Agent %]</td>
  27 +<td>
  28 +<div style="width:100%; max-height:200px; overflow:auto">[% Data.Paths %]</div>
  29 +</td>
  30 +<td>
  31 +<div style="width:100%; max-height:200px; overflow:auto">[% Data.Queues %]</div>
  32 +</td>
  33 +</tr>
  34 +[% RenderBlockEnd("QueuesPerAgent") %]
  35 +</tbody>
  36 +</table>
0 37 \ No newline at end of file
... ...
SQLs.txt 0 → 100644
... ... @@ -0,0 +1,24 @@
  1 +select
  2 + 'Manage' AS `type`,
  3 + concat(`d`.`first_name`,' ',`d`.`last_name`) AS `user`,
  4 + `a`.`name` AS `queue`
  5 +from
  6 + (((`queue` `a` join `group_role` `b` on((`b`.`group_id` = `a`.`group_id`)))
  7 + join `role_user` `c` on((`c`.`role_id` = `b`.`role_id`)))
  8 + join `users` `d` on((`d`.`id` = `c`.`user_id`)))
  9 +where
  10 + ((`a`.`valid_id` = 1) and (`b`.`permission_key` = 'rw') and
  11 + (`b`.`permission_value` = 1) and ((`a`.`name` like 'N3%') or (`a`.`name` like 'N2%')) and (`d`.`valid_id` = 1))
  12 +union
  13 + select 'Path' AS `type`,concat(`d`.`first_name`,' ',`d`.`last_name`) AS `user`,
  14 + `a`.`name` AS `queue` from (((`queue` `a` join `group_role` `b` on((`b`.`group_id` = `a`.`group_id`)))
  15 + join `role_user` `c` on((`c`.`role_id` = `b`.`role_id`))) join `users` `d` on((`d`.`id` = `c`.`user_id`)))
  16 + where ((`a`.`valid_id` = 1) and (`d`.`valid_id` = 1) and (`b`.`permission_key` = 'move_into')
  17 + and (`b`.`permission_value` = 1) and (`a`.`name` like 'N2%') and (not(exists(select `a1`.`id`
  18 + from ((`queue` `a1` join `group_role` `b1` on((`b1`.`group_id` = `a1`.`group_id`)))
  19 + join `role_user` `c1` on((`c1`.`role_id` = `b1`.`role_id`))) where ((`a1`.`valid_id` = 1)
  20 + and (`b1`.`permission_key` = 'rw') and (`b1`.`permission_value` = 1) and (`a1`.`name` like 'N2%') and
  21 + (`c1`.`user_id` = `d`.`id`))))) and (not(exists(select `a1`.`id` from ((`queue` `a1` join `group_role` `b1`
  22 + on((`b1`.`group_id` = `a1`.`group_id`))) join `role_user` `c1` on((`c1`.`role_id` = `b1`.`role_id`)))
  23 + where ((`a1`.`valid_id` = 1) and (`b1`.`permission_key` = 'rw') and (`b1`.`permission_value` = 1)
  24 + and (`a1`.`name` like 'Primeiro%') and (`c1`.`user_id` = `d`.`id`))))))
... ...