Problem of importing AD dynamic field into ticket

Moderator: crythias

Post Reply
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Problem of importing AD dynamic field into ticket

Post by tune6688 »

Hi, everyone:
I want to import the "manager" field of the user in the AD domain control into the ticket as a dynamic field, but it failed. Please refer the steps below. Thank you very much.

1、 Create AgentManager dynamic field.
1.png
2、 Open Ticket::EventModulePost###4100-DynamicFieldFromCustomerUser in system configuration and input the mapping field in DynamicFieldFromCustomerUser::Mapping.
2.png
3、 Open related field in Ticket::Frontend::AgentTicketFreeText###DynamicField.
3.png
4、 In general, we should be able to see related options in -Miscellaneous-Free Text in ticket details. But I cannot. Please comment whether there are some mistakes or, I missed something. Thanks again.
You do not have the required permissions to view the files attached to this post.
alexus
Znuny wizard
Posts: 380
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Problem of importing AD dynamic field into ticket

Post by alexus »

Hi,

Share your CustomerUser Map from Config.pm.
Alexey Yusov

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

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Problem of importing AD dynamic field into ticket

Post by root »

Hi,

You need to adjust the mapping of your LDAP customer user configuration. FYI: The manager field usually contains a distinguished name and is pretty worthless in this form.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Problem of importing AD dynamic field into ticket

Post by tune6688 »

alexus wrote: 14 Sep 2021, 09:58 Hi,

Share your CustomerUser Map from Config.pm.
Hi

I have configured them,I think i missed something.

Code: Select all

Map => [
				# note: Login, Email and CustomerID needed!
				# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
				#[ 'UserTitle',      'Title',      'title',             1, 0, 'var', '', 0 ],
				[ 'UserLastname',   'Lastname',   'sn',                1, 1, 'var', '', 0 ],
				[ 'UserFirstname',  'Firstname',  'givenname',         1, 1, 'var', '', 0 ],
				[ 'UserLogin',      'Username',   'sAMAccountName',    1, 1, 'var', '', 0 ],
				[ 'UserEmail',      'Email',      'mail', 1, 1, 'var', '', 0 ],
				[ 'UserCustomerID', 'CustomerID', 'sAMAccountName',        0, 1, 'var', '', 0 ],
				[ 'UserManager',    'Manager',    'Manager',            1, 0, 'var', '', 0 ],
				[ 'UserDepartment',    'Department',    'Department',     1, 0, 'var', '', 0 ],
				#[ 'UserComment',    'Comment',    'description',       1, 0, 'var', '', 0 ],
			],
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Problem of importing AD dynamic field into ticket

Post by tune6688 »

root wrote: 14 Sep 2021, 11:42 Hi,

You need to adjust the mapping of your LDAP customer user configuration. FYI: The manager field usually contains a distinguished name and is pretty worthless in this form.

- Roy
Hi

I have configured them,I think i missed something.

Code: Select all

Map => [
				# note: Login, Email and CustomerID needed!
				# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
				#[ 'UserTitle',      'Title',      'title',             1, 0, 'var', '', 0 ],
				[ 'UserLastname',   'Lastname',   'sn',                1, 1, 'var', '', 0 ],
				[ 'UserFirstname',  'Firstname',  'givenname',         1, 1, 'var', '', 0 ],
				[ 'UserLogin',      'Username',   'sAMAccountName',    1, 1, 'var', '', 0 ],
				[ 'UserEmail',      'Email',      'mail', 1, 1, 'var', '', 0 ],
				[ 'UserCustomerID', 'CustomerID', 'sAMAccountName',        0, 1, 'var', '', 0 ],
				[ 'UserManager',    'Manager',    'Manager',            1, 0, 'var', '', 0 ],
				[ 'UserDepartment',    'Department',    'Department',     1, 0, 'var', '', 0 ],
				#[ 'UserComment',    'Comment',    'description',       1, 0, 'var', '', 0 ],
			],
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Problem of importing AD dynamic field into ticket

Post by tune6688 »

tune6688 wrote: 15 Sep 2021, 06:37
alexus wrote: 14 Sep 2021, 09:58 Hi,

Share your CustomerUser Map from Config.pm.
Hi

I have configured them,I think i missed something.

Code: Select all

Map => [
				# note: Login, Email and CustomerID needed!
				# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
				#[ 'UserTitle',      'Title',      'title',             1, 0, 'var', '', 0 ],
				[ 'UserLastname',   'Lastname',   'sn',                1, 1, 'var', '', 0 ],
				[ 'UserFirstname',  'Firstname',  'givenname',         1, 1, 'var', '', 0 ],
				[ 'UserLogin',      'Username',   'sAMAccountName',    1, 1, 'var', '', 0 ],
				[ 'UserEmail',      'Email',      'mail', 1, 1, 'var', '', 0 ],
				[ 'UserCustomerID', 'CustomerID', 'sAMAccountName',        0, 1, 'var', '', 0 ],
				[ 'UserManager',    'Manager',    'Manager',            1, 0, 'var', '', 0 ],
				[ 'UserDepartment',    'Department',    'Department',     1, 0, 'var', '', 0 ],
				#[ 'UserComment',    'Comment',    'description',       1, 0, 'var', '', 0 ],
			],
Please check my pic.
4.png
You do not have the required permissions to view the files attached to this post.
alexus
Znuny wizard
Posts: 380
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Problem of importing AD dynamic field into ticket

Post by alexus »

tune6688 wrote: 15 Sep 2021, 06:37
alexus wrote: 14 Sep 2021, 09:58 Hi,

Share your CustomerUser Map from Config.pm.
Hi

I have configured them,I think i missed something.

Code: Select all

Map => [
				# note: Login, Email and CustomerID needed!
				# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
				#[ 'UserTitle',      'Title',      'title',             1, 0, 'var', '', 0 ],
				[ 'UserLastname',   'Lastname',   'sn',                1, 1, 'var', '', 0 ],
				[ 'UserFirstname',  'Firstname',  'givenname',         1, 1, 'var', '', 0 ],
				[ 'UserLogin',      'Username',   'sAMAccountName',    1, 1, 'var', '', 0 ],
				[ 'UserEmail',      'Email',      'mail', 1, 1, 'var', '', 0 ],
				[ 'UserCustomerID', 'CustomerID', 'sAMAccountName',        0, 1, 'var', '', 0 ],
				[ 'UserManager',    'Manager',    'Manager',            1, 0, 'var', '', 0 ],
				[ 'UserDepartment',    'Department',    'Department',     1, 0, 'var', '', 0 ],
				#[ 'UserComment',    'Comment',    'description',       1, 0, 'var', '', 0 ],
			],
You should use "UserManager" as a Customer attribute in SysConfig instead of "Manager"
Alexey Yusov

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

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Problem of importing AD dynamic field into ticket

Post by tune6688 »

alexus wrote: 15 Sep 2021, 09:36
tune6688 wrote: 15 Sep 2021, 06:37
alexus wrote: 14 Sep 2021, 09:58 Hi,

Share your CustomerUser Map from Config.pm.
Hi

I have configured them,I think i missed something.

Code: Select all

Map => [
				# note: Login, Email and CustomerID needed!
				# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
				#[ 'UserTitle',      'Title',      'title',             1, 0, 'var', '', 0 ],
				[ 'UserLastname',   'Lastname',   'sn',                1, 1, 'var', '', 0 ],
				[ 'UserFirstname',  'Firstname',  'givenname',         1, 1, 'var', '', 0 ],
				[ 'UserLogin',      'Username',   'sAMAccountName',    1, 1, 'var', '', 0 ],
				[ 'UserEmail',      'Email',      'mail', 1, 1, 'var', '', 0 ],
				[ 'UserCustomerID', 'CustomerID', 'sAMAccountName',        0, 1, 'var', '', 0 ],
				[ 'UserManager',    'Manager',    'Manager',            1, 0, 'var', '', 0 ],
				[ 'UserDepartment',    'Department',    'Department',     1, 0, 'var', '', 0 ],
				#[ 'UserComment',    'Comment',    'description',       1, 0, 'var', '', 0 ],
			],
You should use "UserManager" as a Customer attribute in SysConfig instead of "Manager"
Hi alexus,

As you said, I did it.But Noting happend! I distrust that something else is wrong. Could you kindly check it for me? Thanks for your kind reply!
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Problem of importing AD dynamic field into ticket

Post by root »

Hi,

Let's start at the beginning. Do you see the manager field in the customer user information box? You might check this with a phone ticket.
if not: have you ever considered that this field is not set for the customer user you checking? Have you checked this? E.g. with ldapsearch?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
alexus
Znuny wizard
Posts: 380
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Problem of importing AD dynamic field into ticket

Post by alexus »

tune6688 wrote: 15 Sep 2021, 14:50
As you said, I did it.But Noting happend! I distrust that something else is wrong. Could you kindly check it for me? Thanks for your kind reply!
Share the ticket with customer info and ticket history
Alexey Yusov

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

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Problem of importing AD dynamic field into ticket

Post by tune6688 »

alexus wrote: 15 Sep 2021, 16:13
tune6688 wrote: 15 Sep 2021, 14:50
As you said, I did it.But Noting happend! I distrust that something else is wrong. Could you kindly check it for me? Thanks for your kind reply!
Share the ticket with customer info and ticket history
Hi alexus,
Thanks very much!, I check it again,Only new ticket will update the dynamic field.Finally i got it!

By the way,The Manager field how to link to a customeruser ?

Do you have any idea ?

Thanks!
alexus
Znuny wizard
Posts: 380
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Problem of importing AD dynamic field into ticket

Post by alexus »

tune6688 wrote: 16 Sep 2021, 15:29
By the way,The Manager field how to link to a customeruser ?
What do you mean by "link"?
Alexey Yusov

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

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Problem of importing AD dynamic field into ticket

Post by root »

tune6688 wrote: 16 Sep 2021, 15:29 Thanks very much!, I check it again,Only new ticket will update the dynamic field.Finally i got it!
Hi,

That's why the event module is registered to TicketCreate and TicketCustomerUpdate. It only affect tickets where this event is thrown after activating the event module.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Problem of importing AD dynamic field into ticket

Post by tune6688 »

alexus wrote: 16 Sep 2021, 15:36
tune6688 wrote: 16 Sep 2021, 15:29
By the way,The Manager field how to link to a customeruser ?
What do you mean by "link"?
As we know, user A’s manager is user B, and both A and B are customer users. As the "Manager" field is stated as "CN=xxx,OU=xxx..." in the AD domain, which is just a field. Then how can we find and point to the real user B in OTRS?
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Problem of importing AD dynamic field into ticket

Post by tune6688 »

root wrote: 16 Sep 2021, 15:38
tune6688 wrote: 16 Sep 2021, 15:29 Thanks very much!, I check it again,Only new ticket will update the dynamic field.Finally i got it!
Hi,

That's why the event module is registered to TicketCreate and TicketCustomerUpdate. It only affect tickets where this event is thrown after activating the event module.

- Roy
Thank you very much, I know it now.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Problem of importing AD dynamic field into ticket

Post by root »

tune6688 wrote: 17 Sep 2021, 03:48 As we know, user A’s manager is user B, and both A and B are customer users. As the "Manager" field is stated as "CN=xxx,OU=xxx..." in the AD domain, which is just a field. Then how can we find and point to the real user B in OTRS?
Hi,

This requires development or a commercial add-on.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Problem of importing AD dynamic field into ticket

Post by tune6688 »

We are hugely grateful to all those who helped!
alexus
Znuny wizard
Posts: 380
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Problem of importing AD dynamic field into ticket

Post by alexus »

tune6688 wrote: 17 Sep 2021, 03:48 As we know, user A’s manager is user B, and both A and B are customer users. As the "Manager" field is stated as "CN=xxx,OU=xxx..." in the AD domain, which is just a field. Then how can we find and point to the real user B in OTRS?
What is your business scenario? How do you want to use Manager data?
Alexey Yusov

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

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Problem of importing AD dynamic field into ticket

Post by tune6688 »

alexus wrote: 18 Sep 2021, 13:44
tune6688 wrote: 17 Sep 2021, 03:48 As we know, user A’s manager is user B, and both A and B are customer users. As the "Manager" field is stated as "CN=xxx,OU=xxx..." in the AD domain, which is just a field. Then how can we find and point to the real user B in OTRS?
What is your business scenario? How do you want to use Manager data?
Thanks for your concern!

I want to get the "Deparment" field and the "Manager"field from AD, these will be used to the approval process.

Would you have any suggestions for this?
Post Reply