[SOLVED]Register new "Services" on a massive scale

Moderator: crythias

facundocaballe
OTRS newbie
Posts: 12
Joined: 27 Mar 2017, 22:07
OTRS Version?: OTRS5
Real Name: Facundo Caballe
Company: Yagmour

[SOLVED]Register new "Services" on a massive scale

Postby facundocaballe » 21 Apr 2017, 20:09

Hello all.

I am starting with OTRS in my area. I maked a Categories tree (Services) on paper, and now, i want to register it on OTRS. This task is very tedious, because i have to make it one on one.
There is a way to register all the Services, making an import from an xls or something like that?

The second question, is how to relate all the services to the customers. It is also a tedious task, one on one. There is a fastest way to do it?

Thanks in advanced for the answers.

Best Regards.
Facundo
Last edited by facundocaballe on 26 Apr 2017, 16:02, edited 2 times in total.

root
Moderator
Posts: 841
Joined: 18 Dec 2007, 12:23
OTRS Version?: 5.0.x
Real Name: Roy Kaldung
Company: Znuny Inc.
Contact:

Re: Register new "Services" on a massive scale. Also assign the services to all users.

Postby root » 21 Apr 2017, 20:27

1) Create a file with one service per line and use the base to call bin/otrs.Console.pl Admin::Service::Add

2) After importing all services, one click at the top row marks all services as standard services.
OTRS 4 /5 CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

You need professional services? Check out http://znuny.com/

facundocaballe
OTRS newbie
Posts: 12
Joined: 27 Mar 2017, 22:07
OTRS Version?: OTRS5
Real Name: Facundo Caballe
Company: Yagmour

Re: Register new "Services" on a massive scale. Also assign the services to all users.

Postby facundocaballe » 21 Apr 2017, 21:07

Root

First of all, thanks for the answer.
I did not understand very well the answer.

I`ve found the otrs.Console.pl in the /bin directory. This is the content on it:

Code: Select all

use strict;
use warnings;

use File::Basename;
use FindBin qw($RealBin);
use lib dirname($RealBin);
use lib dirname($RealBin) . '/Kernel/cpan-lib';
use lib dirname($RealBin) . '/Custom';

use Kernel::System::ObjectManager;

local $Kernel::OM = Kernel::System::ObjectManager->new(
    'Kernel::System::Log' => {
        LogPrefix => 'OTRS-otrs.Console.pl',
    },
);

exit $Kernel::OM->Get('Kernel::System::Console::InterfaceConsole')->Run(@ARGV);


How can I call the file to import the Services?

Do I need to make a file like this?

Code: Select all

Service1
Service2
Service3
Service4
Service4::Subservice1::Subsubservice1


And for the second point, you telled me make a click at the top row. In what area of the OTRS i have to do it?

Thanks in advance, and sorry for my little knowledge of the system.

Best Regards.
Facundo

facundocaballe
OTRS newbie
Posts: 12
Joined: 27 Mar 2017, 22:07
OTRS Version?: OTRS5
Real Name: Facundo Caballe
Company: Yagmour

Re: Register new "Services" on a massive scale. Also assign the services to all users.

Postby facundocaballe » 21 Apr 2017, 22:49

Root.

I've found this command

su -c "/opt/otrs/bin/otrs.Console.pl Admin::Service::Add --name ServiceA --parent-name Service1" otrs

I think you refer to this, with your answer. Well, now please, can you tell me how can i make massive addings of services?

Thanks in advanced.

Best Regards.
Facundo

facundocaballe
OTRS newbie
Posts: 12
Joined: 27 Mar 2017, 22:07
OTRS Version?: OTRS5
Real Name: Facundo Caballe
Company: Yagmour

Re: Register new "Services" on a massive scale. Also assign the services to all users.

Postby facundocaballe » 25 Apr 2017, 18:23

Hi all.

To register the services, you have to make a document with this structure

Code: Select all

#! / Bin / bash

Your -c "/opt/otrs/bin/otrs.Console.pl Admin :: Service :: Add --name (Name of your service) --parent-name (name of parent service, if apply)" otrs


You can copy the line several times in the document, changing services names.

If you want to Add, sub--sub-services, first make the Sub-Service, then, make the sub-sub-service with the sub-service as parent, and manually add to the root service via OTRS WebConsole.

A little note. When the service name has more than one word, you must write it as this "new service", with an apostrophe

Best regards
Facundo


Return to “Help”

Who is online

Users browsing this forum: No registered users and 6 guests