Hello,
I plan to create a dynamic field of type "Dropdown", but as it will have a lot of keys/values (200), and as I'll create the same field on several servers (at least test then production), I do not want to enter things manually using the OTRS "AdminDynamicFieldDropdown" form. I want to do that with a script.
I will take example on an existing dropdown field.
I think I will just create manually an "empty" dynamic field (i.e. without the keys/values) using the OTRS interface, and then I will use a script to SET the "PossibleValues" part of the "config" field of the dynamic_field table of the otrs database.
My question:
Are there things to know, like some precautions or perhaps dependencies elsewhere in other otrs data points I should be aware of?
Thanks
Creating a dynamic field (dropdown) programmatically (MySQL)
Moderator: crythias
-
- Znuny wizard
- Posts: 381
- 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: Creating a dynamic field (dropdown) programmatically (MySQL)
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?
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?
-
- Znuny newbie
- Posts: 12
- Joined: 30 Jan 2021, 07:51
- Znuny Version: 6 community
- Real Name: Vincent B.
Re: Creating a dynamic field (dropdown) programmatically (MySQL)
Thanks Alexus, but the ImportExportDynamicFields you mention does not answer to my question and to my needs.
(As far as I know that would just allow me to copy a dynamic field from a server to another one, but would provide no help for creating the dynamic field and its numerous keys/values.)
(As far as I know that would just allow me to copy a dynamic field from a server to another one, but would provide no help for creating the dynamic field and its numerous keys/values.)
-
- Znuny wizard
- Posts: 471
- Joined: 20 Nov 2011, 16:08
- Znuny Version: 6.5.4
- Real Name: Schulmann
Re: Creating a dynamic field (dropdown) programmatically (MySQL)
Znuny6/Debian/ESXi
-
- Znuny newbie
- Posts: 12
- Joined: 30 Jan 2021, 07:51
- Znuny Version: 6 community
- Real Name: Vincent B.
Re: Creating a dynamic field (dropdown) programmatically (MySQL)
Hi schulmann, thanks for the suggestion (using Perl OTRS libray), I admit it makes sense, but I do not want to learn all the OTRS and Perl stuff! (moreover I do not program using Perl)
I'm looking for a simple/quick solution, i.e. just a basic use of SQL for creating and/or updating some appropriate field with some appropriate value.
I'm looking for a simple/quick solution, i.e. just a basic use of SQL for creating and/or updating some appropriate field with some appropriate value.
-
- Znuny wizard
- Posts: 381
- 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: Creating a dynamic field (dropdown) programmatically (MySQL)
Check "config" column in dynamic_field table
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?
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?