Hi,
I'm new to OTRS and I want to display a tree in the AgentBackoffice showing all queues the agent may see and all Agents that belong to these queues.
(The overall goal is to have a tree with Queues and its Agents at the left, a List of the tickets of a selected agent at the upper right, and a preview of the selected ticket at the lower right - it should look like in a usual mail client)
My question now is: How do I (nested) loop over queues and the agents belonging to a queue?
Is there a way to cascade (nest) $Self->{LayoutObject}->Block(...)?
I have the values (queues and agents) in my module, but I don't know how to get them looped in the .dtl.
I would leike to have the values in that way in the .dtl:
<ul>
<li>
Queue1
<ul>
<li>Agent 1</li>
<li>Agent 2</li>
<li>Agent 3</li>
</ul>
</li>
<li>
Queue2
<ul>
<li>Agent 1</li>
<li>Agent 2</li>
</ul>
</li>
</ul>
Or, are there completely different/better ways to do it (loop)?
Thanks
MT75
Treeview of queues and agents
Treeview of queues and agents
OTRS (local eval system): 3.0.11 on Windows XP
-
- Znuny guru
- Posts: 2189
- Joined: 08 Dec 2005, 17:01
- Znuny Version: 5.0.x
- Real Name: André Bauer
- Company: Magix Software GmbH
- Location: Dresden
- Contact:
Re: Treeview of queues and agents
Prod: Ubuntu Server 16.04 / Zammad 1.2
DO NOT PM ME WITH OTRS RELATED QUESTIONS! ASK IN THE FORUMS!
OtterHub.org
DO NOT PM ME WITH OTRS RELATED QUESTIONS! ASK IN THE FORUMS!
OtterHub.org
Re: Treeview of queues and agents
Hi monotek,
Thanks for your answer.
Yes, I have seen that, but I don't know where to find it in the code. Can someone help me with that?
Or, maybe can help me with my fist post?
Regards
MT75
Thanks for your answer.
Yes, I have seen that, but I don't know where to find it in the code. Can someone help me with that?
Or, maybe can help me with my fist post?
Regards
MT75
OTRS (local eval system): 3.0.11 on Windows XP
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Treeview of queues and agents
Pseudo code follows
http://dev.otrs.org/
my %Queues = $QueueObject->GetAllQueues();
Loop through %Queues (it has id, name)
then use
my $GroupID = $QueueObject->GetQueueGroupID( QueueID => $QueueID );
my @Groups = $GroupObject->GroupMemberList(
GroupID => $GroupID,
Type => 'move_into', #or ro
Result => 'Name',
);
Loop through that for names.
As you're looping, store in a variable that you'll return.
For hints, check out the Modules/AdminUserGroup.pm
http://dev.otrs.org/
my %Queues = $QueueObject->GetAllQueues();
Loop through %Queues (it has id, name)
then use
my $GroupID = $QueueObject->GetQueueGroupID( QueueID => $QueueID );
my @Groups = $GroupObject->GroupMemberList(
GroupID => $GroupID,
Type => 'move_into', #or ro
Result => 'Name',
);
Loop through that for names.
As you're looping, store in a variable that you'll return.
For hints, check out the Modules/AdminUserGroup.pm
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Treeview of queues and agents
Thank you for the hints.
I had also alook at the mentioned module and the AdminUserGroup.dtl.
Here both list (users and groups) are beside each other.
Is there a way to nest the users into the group/queue they belong to? My question is about how to do it in the dtl template when I have all necessary information about groups and users (in the module). How do I display them in that kind (or similar):
I had also alook at the mentioned module and the AdminUserGroup.dtl.
Here both list (users and groups) are beside each other.
Is there a way to nest the users into the group/queue they belong to? My question is about how to do it in the dtl template when I have all necessary information about groups and users (in the module). How do I display them in that kind (or similar):
Code: Select all
<ul>
<li>
Queue1
<ul>
<li>Agent 1</li>
<li>Agent 2</li>
<li>Agent 3</li>
</ul>
</li>
<li>
Queue2
<ul>
<li>Agent 1</li>
<li>Agent 2</li>
</ul>
</li>
</ul>
OTRS (local eval system): 3.0.11 on Windows XP
-
- Znuny newbie
- Posts: 2
- Joined: 22 Jun 2016, 15:10
- Znuny Version: Otrs 5
- Real Name: Ck
- Company: CSL
Re: Treeview of queues and agents
Am learning OTRS Now,
Am trying to create TreeView of Agents,Groups,Queues ....,the below code is ok in general,But how do i do in OTRS,
Or can we organise theses agents/groups/Queues using Sysconfig,
Can any one advise pls
<ul>
<li>
Queue1
<ul>
<li>Agent 1</li>
<li>Agent 2</li>
<li>Agent 3</li>
</ul>
</li>
<li>
Queue2
<ul>
<li>Agent 1</li>
<li>Agent 2</li>
</ul>
</li>
</ul>
B/regards
Chandu
Am trying to create TreeView of Agents,Groups,Queues ....,the below code is ok in general,But how do i do in OTRS,
Or can we organise theses agents/groups/Queues using Sysconfig,
Can any one advise pls
<ul>
<li>
Queue1
<ul>
<li>Agent 1</li>
<li>Agent 2</li>
<li>Agent 3</li>
</ul>
</li>
<li>
Queue2
<ul>
<li>Agent 1</li>
<li>Agent 2</li>
</ul>
</li>
</ul>
B/regards
Chandu