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

Moderator: crythias

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

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

Post by facundocaballe »

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
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

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

Post by root »

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.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
facundocaballe
Znuny newbie
Posts: 12
Joined: 27 Mar 2017, 22:07
Znuny Version: OTRS5
Real Name: Facundo Caballe
Company: Yagmour

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

Post by facundocaballe »

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
Znuny newbie
Posts: 12
Joined: 27 Mar 2017, 22:07
Znuny Version: OTRS5
Real Name: Facundo Caballe
Company: Yagmour

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

Post by facundocaballe »

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
Znuny newbie
Posts: 12
Joined: 27 Mar 2017, 22:07
Znuny Version: OTRS5
Real Name: Facundo Caballe
Company: Yagmour

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

Post by facundocaballe »

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
Post Reply