несколько компаний на одного клиента

Запросы на решение проблем

Модератор: ykolesnikov

Ответить
terminalmsk
OTRS Новобранец
Сообщения: 3
Зарегистрирован: 29 ноя 2017, 22:40

несколько компаний на одного клиента

Сообщение terminalmsk » 29 ноя 2017, 23:06

Используем 5ю OTRS, не могу найти четкую инструкцию как можно сделать так, чтобы к 1 пользователю можно было прикрепить к нескольким компаний. Пытался воспользоваться поиском, везде пишут про включение множественного CustomerID, но я не могу найти как это включить.

Задача: есть 5 компаний, в каждой компании есть свои пользователи. Но есть Пользователь к примеру бухгалтер, который работает в этих 5 компаниях и может оставить заявку. Создавать 5 учетных записей с 1 электронной почтой не возможно. Помогите найти выход, как это можно организовать. Заранее огромное спасибо !

alexus
OTRS Гуру
Сообщения: 5192
Зарегистрирован: 20 сен 2010, 18:17
Откуда: Москва
Благодарил (а): 92 раза
Поблагодарили: 82 раза

Re: несколько компаний на одного клиента

Сообщение alexus » 30 ноя 2017, 00:10

Customer with multiple IDs (Company tickets)
It is possible to assign more than one customer ID to a customer. This can be useful if a customer must access tickets of other customers, e.g. a supervisor wants to watch the tickets of his assistants. If a customer can access the tickets of another customer, the company ticket feature of OTRS is used. Company tickets can be accessed via the "Company Tickets" link in the customer panel.
To use company tickets, a new column with the IDs that should be accessible for a customer, has to be added to the customer_user table in the OTRS database (see Script below).

Код: Выделить всё

linux:~# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 124 to server version: 5.0.18-Debian_7-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use otrs;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> ALTER TABLE customer_user ADD customer_ids VARCHAR (250);
Query OK, 1 rows affected (0.02 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> quit
Bye
linux:~#
Script: Adding a customer_ids field to the customer_user table.
Now the new column has to be added to the MAP array in Kernel/Config.pm, as shown in the script below.

Код: Выделить всё

    # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
    [...]
    [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
Script: Adding a UserCustomerIDs field to the Kernel/Config.pm file.
Now, the new column for the multiple customer IDs can be edited via the Agent interface, in the section for the customer management.
To ensure that one customer can access the tickets of other customers, add the IDs of these other users into the new field for the multiple customer IDs. Each ID has to be separated by a semicolon (see Example 11-2 below).
Example 4.6. Using company tickets with a DB backend
The customers A, B and C exist in your system, and A wants to have access to the tickets of B and C via the customer panel. B and C should have no access to the tickets of other users.
To realize this setup, change the customer_user table and the mapping in Kernel/Config.pm as described above. Then load the settings for customer A via the Customers link in the Agent interface or via the Admin page. If the settings are displayed, add into the field for CustomerIDs the values "B;C;".
С уважением,
Алексей Юсов

Prod: OTRS CE ITSM 6.0.28 on CentOS 7 Apache 2.4 MariaDB 10.4.13 + Radiant Customer Portal

Radiant System OTRS Intergrator RU
Группа OTRS Community в Teleram
Хотите внедрить OTRS? Спросите меня как!

terminalmsk
OTRS Новобранец
Сообщения: 3
Зарегистрирован: 29 ноя 2017, 22:40

Re: несколько компаний на одного клиента

Сообщение terminalmsk » 30 ноя 2017, 23:37

alexus писал(а):Customer with multiple IDs (Company tickets)
It is possible to assign more than one customer ID to a customer. This can be useful if a customer must access tickets of other customers, e.g. a supervisor wants to watch the tickets of his assistants. If a customer can access the tickets of another customer, the company ticket feature of OTRS is used. Company tickets can be accessed via the "Company Tickets" link in the customer panel.
To use company tickets, a new column with the IDs that should be accessible for a customer, has to be added to the customer_user table in the OTRS database (see Script below).

Код: Выделить всё

linux:~# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 124 to server version: 5.0.18-Debian_7-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use otrs;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> ALTER TABLE customer_user ADD customer_ids VARCHAR (250);
Query OK, 1 rows affected (0.02 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> quit
Bye
linux:~#
Script: Adding a customer_ids field to the customer_user table.
Now the new column has to be added to the MAP array in Kernel/Config.pm, as shown in the script below.

Код: Выделить всё

    # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
    [...]
    [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
Script: Adding a UserCustomerIDs field to the Kernel/Config.pm file.
Now, the new column for the multiple customer IDs can be edited via the Agent interface, in the section for the customer management.
To ensure that one customer can access the tickets of other customers, add the IDs of these other users into the new field for the multiple customer IDs. Each ID has to be separated by a semicolon (see Example 11-2 below).
Example 4.6. Using company tickets with a DB backend
The customers A, B and C exist in your system, and A wants to have access to the tickets of B and C via the customer panel. B and C should have no access to the tickets of other users.
To realize this setup, change the customer_user table and the mapping in Kernel/Config.pm as described above. Then load the settings for customer A via the Customers link in the Agent interface or via the Admin page. If the settings are displayed, add into the field for CustomerIDs the values "B;C;".
Куда это надо вставлять? прям в конец этого файла ? и как ? прям взять и скопировать? Можете ткнуть пальцем пожалуйста, я новичок в этом

terminalmsk
OTRS Новобранец
Сообщения: 3
Зарегистрирован: 29 ноя 2017, 22:40

Re: несколько компаний на одного клиента

Сообщение terminalmsk » 30 ноя 2017, 23:49

Куда это вставить ? Вот наш файл Kernel/Config.pm


# --
# Copyright (C) 2001-2017 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
# Note:
#
# -->> Most OTRS configuration should be done via the OTRS web interface
# and the SysConfig. Only for some configuration, such as database
# credentials and customer data source changes, you should edit this
# file. For changes do customer data sources you can copy the definitions
# from Kernel/Config/Defaults.pm and paste them in this file.
# Config.pm will not be overwritten when updating OTRS.
# --

package Kernel::Config;

use strict;
use warnings;
use utf8;

sub Load {
my $Self = shift;

# ---------------------------------------------------- #
# database settings #
# ---------------------------------------------------- #

# The database host
$Self->{'DatabaseHost'} = '127.0.0.1';

# The database name
$Self->{'Database'} = "wqwqqwqw";

# The database user
$Self->{'DatabaseUser'} = "otrs";

# The password of database user. You also can use bin/otrs.Console.pl Maint::Database::PasswordCrypt
# for crypted passwords
$Self->{'DatabasePw'} = 'rerewrewrew';

# The database DSN for MySQL ==> more: "perldoc DBD::mysql"
$Self->{'DatabaseDSN'} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost}";

# The database DSN for PostgreSQL ==> more: "perldoc DBD::Pg"
# if you want to use a local socket connection
# $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
# if you want to use a TCP/IP connection
# $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};";

# The database DSN for Microsoft SQL Server - only supported if OTRS is
# installed on Windows as well
# $Self->{DatabaseDSN} = "DBI:ODBC:driver={SQL Server};Database=$Self->{Database};Server=$Self->{DatabaseHost},1433";

# The database DSN for Oracle ==> more: "perldoc DBD::oracle"
# $Self->{DatabaseDSN} = "DBI:Oracle://$Self->{DatabaseHost}:1521/$Self->{Database}";
#
# $ENV{ORACLE_HOME} = '/path/to/your/oracle';
# $ENV{NLS_DATE_FORMAT} = 'YYYY-MM-DD HH24:MI:SS';
# $ENV{NLS_LANG} = 'AMERICAN_AMERICA.AL32UTF8';

# ---------------------------------------------------- #
# fs root directory
# ---------------------------------------------------- #
$Self->{Home} = '/opt/otrs';

# ---------------------------------------------------- #
# insert your own config settings "here" #
# config settings taken from Kernel/Config/Defaults.pm #
# ---------------------------------------------------- #
# $Self->{SessionUseCookie} = 0;
# $Self->{CheckMXRecord} = 0;

# ---------------------------------------------------- #

# ---------------------------------------------------- #
# data inserted by installer #
# ---------------------------------------------------- #
# $DIBI$

# ---------------------------------------------------- #
# ---------------------------------------------------- #
# #
# end of your own config options!!! #
# #
# ---------------------------------------------------- #
# ---------------------------------------------------- #
}

# ---------------------------------------------------- #
# needed system stuff (don't edit this) #
# ---------------------------------------------------- #

use Kernel::Config::Defaults; # import Translatable()
use base qw(Kernel::Config::Defaults);

# -----------------------------------------------------#

1;

Glifed
OTRS Новобранец
Сообщения: 110
Зарегистрирован: 16 ноя 2017, 12:48
Благодарил (а): 2 раза
Поблагодарили: 2 раза

Re: несколько компаний на одного клиента

Сообщение Glifed » 02 апр 2018, 10:39

как успехи? разобрались???
OTRS 5.0.26
CentOS 7
Skype dimdim5858

Ответить