Quickly make a Group and add User and Queue to it

Dont create your support topics here! No new topics with questions allowed!

Moderator: crythias

Forum rules
Dont create your support topics here! No new topics with questions allowed!
Post Reply
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Quickly make a Group and add User and Queue to it

Post by crythias »

"how do I quickly add [a whole bunch of] agent groups and add the agents and the queues to the group?"
Let's say you have a spreadsheet with a list of usernames:

Code: Select all

username | command
bob      | ="bin/otrs.AddGroup.pl -n " & A2 & "_grp; bin/otrs.AddUser2Group.pl -g "& A2 & "_grp -u " & A2 & " -p rw; bin/otrs.AddQueue.pl -n "& A2 & "_q -g "& A2 & "_grp"
tom      | ="bin/otrs.AddGroup.pl -n " & A3 & "_grp; bin/otrs.AddUser2Group.pl -g "& A3 & "_grp -u " & A3 & " -p rw; bin/otrs.AddQueue.pl -n "& A3 & "_q -g "& A3 & "_grp"
It'll look like:
bin/otrs.AddGroup.pl -n bob_grp; bin/otrs.AddUser2Group.pl -g bob_grp -u bob -p rw; bin/otrs.AddQueue.pl -n bob_q -g bob_grp
bin/otrs.AddGroup.pl -n tom_grp; bin/otrs.AddUser2Group.pl -g tom_grp -u tom -p rw; bin/otrs.AddQueue.pl -n tom_q -g tom_grp

If you need additional configuration items for AddQueue, go to a command/shell prompt and type bin/otrs.AddQueue.pl -h

Code: Select all

otrs.AddQueue.pl <Revision 1.5> - add new queue
Copyright (C) 2001-2011 xxx, http://otrs.org/
usage: otrs.AddQueue.pl -n <NAME> -g <GROUP> [-s <SYSTEMADDRESSID> -S <SYSTEMADDRESS> -c <COMMENT> -r <FirstResponseTime> -u <UpdateTime> -l <SolutionTime> -C <CalendarID>]
Once you have that big list, and you're happy with it, copy column 2 and paste to a shell/command prompt from /opt/otrs. (Do it in chunks, test, verify, if you like it, great. If you don't, make changes.)
Don't forget that you'll want to add supervisors to the groups, which you can either do this way or via the GUI.

"What would I use this for?"
Individual agent queues, specifically.

"Why do I want individual agent queues?"
Just in case you want to segregate tickets per agent where the other agents can't necessarily see them.

Now, it's *possible* that customers may also not see these tickets while the tickets are in the agent's queue, especially if CustomerGroupSupport is enabled and the CustomerGroupAlwaysGroups do not include these agent groups.
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
Post Reply