[otrs] Create a new environment variable using LDAP parameters

Alexis HAUSER alexis.hauser at imt-atlantique.fr
Fri May 15 07:45:35 UTC 2020


Thanks for your reply. 
I already use his mecanism but it only get the value of a LDAP attribute related to a ticket from a user. 

I would like to get that same attribute from the current connected operator. 
I was able to do something similar using the current connected operator name (if the current connected operator is the same than the owner of the ticket, then...) : 
[% IF Data.OwnerID == Env('UserID') %] 

However, I would like now to check "if the current connected operator LDAP attribute "Entity" is "IT Depaterment" then... 
But there it seems this LDAP attribute defined in Config.pm doesn't become an environment variable... This is why I try to get its value and create an environment variable in Layout.pm to be able to use it in .tt files. 


De: "Alvaro Cordero" <alvaro at gridshield.net> 
À: "otrs" <otrs at lists.otrs.org> 
Envoyé: Vendredi 15 Mai 2020 01:24:17 
Objet: Re: [otrs] Create a new environment variable using LDAP parameters 

Hello, there is a configuration of dynamic field to CustomerMap where you can set Customer Information from LDAP resource into dynamic fields and get those assigned and shown in tickets, that way you don't need to modify anything, just create the dynamic fields, map the configuration and set them into Config.pm in the order you want to show. 
Best Regards. 

El jue., 14 may. 2020 a las 9:11, Alexis HAUSER (< [ mailto:alexis.hauser at imt-atlantique.fr | alexis.hauser at imt-atlantique.fr ] >) escribió: 


I found out that it was possible to modify Layout.pm to create a new environment variable. 

For example, it's possible to create a new variable called "New Variable" : 
$Self->{NewVariable} = $ConfigObject->Get('DefaultTheme'); 

And call it inside a .tt template file using : 
[% Env('NewVariable') %] 

I would like to get a LDAP parameters to define it there, in the Layout.pm 
This parameter is defined in Config.pm as "UserEntity", which is actually a parameter in our LDAP that we display on a ticket. What should I do to create a new variable containing it's value ? 
It seems it's not contained inside a ConfigObject but somewhere else... 


OTRS mailing list: otrs - Webpage: [ http://otrs.org/ | http://otrs.org/ ] 
Archive: [ http://lists.otrs.org/pipermail/otrs | http://lists.otrs.org/pipermail/otrs ] 
To unsubscribe: [ http://lists.otrs.org/mailman/listinfo/otrs | http://lists.otrs.org/mailman/listinfo/otrs ] 

Alvaro Cordero Retana 
Consultor de Tecnologias 
Tel: 22585757 ext 123 
Email: [ mailto:alvaro at gridshield.net | alvaro at gridshield.net ] 

OTRS mailing list: otrs - Webpage: http://otrs.org/ 
Archive: http://lists.otrs.org/pipermail/otrs 
To unsubscribe: http://lists.otrs.org/mailman/listinfo/otrs 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.otrs.org/pipermail/otrs/attachments/20200515/026ba7f2/attachment.htm>

More information about the otrs mailing list