-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Carlos,
Does anyone knows Is there any way to access the config upload functions
via code in a Package installation? For example to write the config
file, please it some ware in the filesystem and upload it to the main
configuration, or to upload the config options itself via code in a package
Do you want to change existing values or simply add new configuration
values?
However, for new configuration values you should use xml-files as
/Kernel/Config/Ticket.xml (which contains a lot of config
values).
For updated or changed values which are already defined you can use a
similar approach - as long as your XML-file gets read later than the
original. For instance you can write a ZZZZMyDefaultTicket.xml which
overwrite original OTRS default config with your default ticke config.
Another approach, which is more understandable, is to use a
Kernel::System::Config object to set your config values. Just insert the
corresponding code in the CodeInstall section of your sopm. The original
default values are not affected then.
A simple sample, which adds a new queue-layout to the
'PreferencesGroups###QueueView' SysConfig queue:
#--------------------------------------------------------------------
$Self->{ConfigQueueView} = Kernel::System::Config->new(%{$Self});
$Self->{ConfigQueueView}->ConfigItemUpdate(
Valid => 1,
Key => 'PreferencesGroups###QueueView',
Value => {
'Prio' => '3000',
'Label' => 'QueueView',
'DataSelected' => 'AgentTicketQueueTicketView',
'PrefKey' => 'UserQueueView',
'Module' => 'Kernel::Output::HTML::PreferencesGeneric',
'Desc' => 'Select your frontend QueueView.',
'Data' => {
'AgentTicketQueueTicketViewLite' => 'Lite',
'AgentTicketQueueTicketViewFoldable' => 'Foldable',
'AgentTicketQueueTicketView' => 'Standard'
},
'Colum' => 'Frontend',
'Activ' => '1'
}
);
#--------------------------------------------------------------------
See also http://dev.otrs.org/2.3/Kernel/System/Config.html for more
information.
regards, Torsten Thau
- --
Torsten Thau, Dipl. Inform.
c.a.p.e. IT Labs GbR - Annaberger Str. 240 - D-09125 Chemnitz
phone: +49 371 5347 623
cell: +49 176 66 680 680
personal pgp-key: 0x93E0A174
fax: +49 371 5347 625
http://www.cape-it.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkoWa5gACgkQvXo8m5PgoXQkigCbBT+a87PYnHB/8TfAp/1C5P13
riwAn2NFMNVGZGJ8Ww7qXOKzK360TOFG
=DCGO
-----END PGP SIGNATURE-----