Strange behavoir of list of service

Moderator: crythias

Locked
Elrengil
Znuny newbie
Posts: 6
Joined: 09 Aug 2012, 15:50
Znuny Version: 3.1.2
Real Name: Gleb
Company: Bank

Strange behavoir of list of service

Post by Elrengil »

Sorry for my bad English

I want next, when the choice of a particular type, it was possible to select only a certain service.
I write two ACL one for Agent and one for user interface. When you select a specific ticket type, you can select only a certain service. The range of services began to look as on the screen. Is it possible to simply removing unnecessary services from the list, and not to make them inactive?


In Agent interface:
Image

In customer interface:
Image

ACL look like that:

$Self->{TicketAcl}->{'ACL-CustomerAXY'} =
{
# these are the properties used for matching ticket etc.
# match properties
Properties => {Frontend => {Action => ['CustomerTicketMessage'] }},

# match property = all customer tickets
Properties => {
# current type match properties
Ticket=> {
Type => [decode_utf8('АХУ')]}},
# return possible options (white list)
Possible => {
# possible ticket options (white list)
Ticket =>
{
Service => [decode_utf8('АХУ')],
Queue => [decode_utf8('АХУ')],
},
},
};

# ticket acl
$Self->{TicketAcl}->{'ACL-AgentAXY'} = {
# match properties
Properties => {
# current type match properties
Ticket => {
Type => [decode_utf8('АХУ')]}},
# return possible options (white list)
Possible => {
# possible ticket options (white list)
Ticket =>
{
Queue => [decode_utf8('АХУ')],
Service => [decode_utf8('АХУ')],
},
},
};
Elrengil
Znuny newbie
Posts: 6
Joined: 09 Aug 2012, 15:50
Znuny Version: 3.1.2
Real Name: Gleb
Company: Bank

Re: Strange behavoir of list of service

Post by Elrengil »

My version OTRS version 3.1.2. The other version dont have this problem
Elrengil
Znuny newbie
Posts: 6
Joined: 09 Aug 2012, 15:50
Znuny Version: 3.1.2
Real Name: Gleb
Company: Bank

Re: Strange behavoir of list of service

Post by Elrengil »

Проблема решена! исправлением файлов AgentTicketPhone.pm и CustomerTicketMessage.pm Открываем каждый из них.
Затем ищем # check if service is disabled и вставляем else и { в места показаные ниже. И всю начинает отображаться нормально во всех браузерах :D

# check if service is disabled
if ( !$Service{$ServiceKey} ) {
$ServiceRegister{Disabled} = 1;
}
else {
push @ServiceList, \%ServiceRegister;
}
# set service as printed
$AddedServices{$ServiceKey} = 1;
Locked