Linking Dynamic Fields

Moderator: crythias

Locked
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Linking Dynamic Fields

Post by Gabor »

Hello,

I am developing an OTRS system to our company and I encountered a little problem related to our customers.
Our customers having sub-customers as well but we are not in contact with them just with our customers directly.
However it is required to list the customer's customers when creating a ticket from agent view.
I was thinking of Dynamic fields dropdown list which is working well however it is always listing all the sub-customers not just the ones related to the selected customer.
Is it possible somehow to link the dynamic field to a customer (like customer ID to company) so it only show the values which belong to the selected customer?

Thank you for your help in advance,
Gabor
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Linking Dynamic Fields

Post by crythias »

acl
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
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Re: Linking Dynamic Fields

Post by Gabor »

thanks for the fast reply.
You mean using the customer permission groups?
But how can you assign a dyn. field to a permission group?
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Re: Linking Dynamic Fields

Post by Gabor »

ok, I found it: http://doc.otrs.org/3.2/en/html/ch18s03.html
I will have a look, thanks very much...
Just a completely different question about dynamic fields:
Criticaly and Impact are dynamic fields and at customer ticketzoom the infopanel is displaying them and I want to turn them off but I couldn't.
I can disable to show SLA or Service but if I untick Dynamic fields they are still shown. I tried even by setting TicketFreeText13 and 14 to invalid but they are still shown! Only way is to comment them out in the dtl?
Thanks again,
Gabor
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Re: Linking Dynamic Fields

Post by Gabor »

Hi Crythias,

I tried to use the acl the following way (customer ID is the link with the company info and Customer_dropdown1 is the dynamic dropdown field to list with this customer):
# ticket acl
$Self->{TicketAcl}->{'ACL-Name-2'} = {
# match properties
Properties => {
# current ticket match properties
Ticket => {
CustomerID => ['Customer1'],
}
},
# return possible options (white list)
Possible => {
# possible ticket options (white list)
Ticket => {
DynamicField_Field1 => ['Customer_dropdown1'],
},
},
};
but it didn't work... or the 'value' has to be the dropdown fields values instead of the dynamic field Name/Title?
I was searching for solutions and I found this:
viewtopic.php?f=60&t=8032
but this is for queues and customer view and I need it for new agent phone and e-mail tickets...
Can you please help?
Last edited by Gabor on 08 Jul 2013, 11:21, edited 2 times in total.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Linking Dynamic Fields

Post by crythias »

Gabor wrote:Dynamic fields dropdown list which is working well however it is always listing all the sub-customers not just the ones related to the selected customer.

Code: Select all

$Self->{TicketAcl}->{'ACL-Name-2'} = {
# match properties
Properties => {
# current ticket match properties
Ticket => {
CustomerID => ['Ericsson USA'],
}
},
# return possible options (white list)
Possible => {
# possible ticket options (white list)
Ticket => {
DynamicField_Field1 => ['MVNO1'],
},
},
};
This says, the only Field1 value that shows for that CustomerID will be the one with the key of "MVNO1"

8032 shows the field or not, depending on queue.

If you wish to restrict what appears in the field, ACL.
If you wish to restrict if the fielld appears. use 8032.
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
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Re: Linking Dynamic Fields

Post by Gabor »

Hi,

yes, I want to set the Dynamic field only to appear with special content if the there is a special customerID.
e.g.: only to show Dynamic field dropdown 'Customer_dropdown1' if Customer ID = "Customer1" and only to show Dynamic field dropdown 'Customer_dropdown2' if Customer ID = "Customer2" otherwise hide Dynamic field in new ticket creation...
Will try 8032, thanks!
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Re: Linking Dynamic Fields

Post by Gabor »

Hello again,

I've done couple of testings with ACL-s but I found that the 'CustomerID' ticket match properties is still not working.
I was using OTRS 3.2.7 then I upgraded it to 3.2.9 as I saw in the release notes that you fixed the CustomerID ACL issues...but you don't. :(
I managed to create other ACL-s eg.: changing dyn.field depending on the ticket type but when I am trying to use the 'CustomerID' as a condition my ACL is not working.
Here is the example I've in the config.pm:

Code: Select all

    # ticket acl
    $Self->{TicketAcl}->{'ACL-MVNO-2'} = {
        # match properties
        Properties => {
            # current ticket match properties
            Ticket => {
                CustomerID => ['value'],
            }
        },
        # return possible options (white list)
        Possible => {
            # possible ticket options (white list)
            Ticket => {
                DynamicField_value => ['value1', 'value2'],
            },
        },
    };
However it always gives me all the options from the dynamic field not just the selected ones. Is this an OTRS bug maybe?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Linking Dynamic Fields

Post by crythias »

Note that CustomerID is the "Company" CustomerID and CustomerUserID is the login, if that helps.
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
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Re: Linking Dynamic Fields

Post by Gabor »

I know, that's the thing I don't want to create ACLs for each customer (hundreds of them) but I want to create the ACL for the company which is set the same CustomerID as the customers belong to the same company (relation to companies should work this way as my understanding).
When I select the customer on the ViewPhoneNew page it fills the empty CustomerID textfield with the (company) CustomerID. I want to create my ACL for this (as per the code above) but it gives all options from the dynamic dropdown menu not just the specified ones in the ACL.
Other ACL-s are working so it is just related to the ACLs which are using the CustomerID field as criteria.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Linking Dynamic Fields

Post by crythias »

acl won't work for new phone because CustomerID is not a part of the ticket until it's submitted.
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
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Re: Linking Dynamic Fields

Post by Gabor »

is there another solution?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Linking Dynamic Fields

Post by crythias »

javascript.
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
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Re: Linking Dynamic Fields

Post by Gabor »

just a quick question. I also wanted to assign the services to the CustomerID (company) instead of assigning the services to users one by one and I found this thread:
viewtopic.php?f=53&t=16398&p=63133
I tested it and it is working even on the 'ViewPhoneNew' page after selecting the customer it only lists the acl filtered services and the whole acl is based on the 'CustomerID'.
So my question is that if it is working with the services why it is not working with the dynamic fields on the same page? :?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Linking Dynamic Fields

Post by crythias »

UserCustomerID <> CustomerID
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
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Re: Linking Dynamic Fields

Post by Gabor »

crythias wrote:UserCustomerID <> CustomerID
ok, so here's the thing. If I create the ticket without the additional dyn. field and save it and want to modify it later (the customer details including CustomerID is part of the ticket) it looks lie it is working (I added the dyn. field to the change priority) but when I change anything else (priority, type, anything) it drops the ACL and lists all the options again. :( I even tried with 'UserLogin' as criteria instead of 'CustomerID' but it is doing the same thing even on the ViewPhoneNew page. :shock:
So going back to the title of this thread -> the dynamic fields cannot be linked properly with the customer not even with a correct acl. Is there a way to fix it in OTRS please?
Locked