[SOLVED]Setting Dynamic Field value via sql script

Moderator: crythias

Locked
ThomasPL10
Znuny newbie
Posts: 90
Joined: 11 Feb 2014, 17:24
Znuny Version: 3.3.2

[SOLVED]Setting Dynamic Field value via sql script

Post by ThomasPL10 »

Hello

I'm trying to set value of Dynamic Field based on some information from AD. For purposes of this case I would like to create some custom script which will connect to AD collect required information and put some predefined value into Dynamic Field.

The problem is that I cannot find any cell in DB which allows me to define Dynamic Field value for particular ticket. Is it even possible? Or maybe do you know some other way to do this.

Thank you in advance for your help!
Last edited by ThomasPL10 on 22 Aug 2016, 21:02, edited 1 time in total.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Setting Dynamic Field value via sql script

Post by jojo »

You should not write directly to the database!

On assigning a customer user to a ticket it is possible to copy values from the LDAP/AD to DynamicFields
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
ThomasPL10
Znuny newbie
Posts: 90
Joined: 11 Feb 2014, 17:24
Znuny Version: 3.3.2

Re: Setting Dynamic Field value via sql script

Post by ThomasPL10 »

Hello jojo thank you for the quick reply.

The thing is that I need to do this for e-mail tickets and make the whole process automatic. I know that I can put the value to dynamic field via postmaster filter however using the filter I don't know how to get info from AD.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Setting Dynamic Field value via sql script

Post by jojo »

there is an automatic event module doing this. But you need to upgrade to OTRS5 first
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
ThomasPL10
Znuny newbie
Posts: 90
Joined: 11 Feb 2014, 17:24
Znuny Version: 3.3.2

Re: Setting Dynamic Field value via sql script

Post by ThomasPL10 »

If you would like to give me some details on this "automatic event module" I'd appriciate it. I have OTRS 5 in my lab environment. I'd love to test it.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Setting Dynamic Field value via sql script

Post by reneeb »

Search for DynamicFieldFromCustomerUser::Mapping in the SysConfig
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
ThomasPL10
Znuny newbie
Posts: 90
Joined: 11 Feb 2014, 17:24
Znuny Version: 3.3.2

Re: Setting Dynamic Field value via sql script

Post by ThomasPL10 »

Thank you reneeb! It will probably fit my needs.
Locked