Kernel::System::SysConfig

Moderator: crythias

Locked
balazj
Znuny newbie
Posts: 2
Joined: 19 Dec 2013, 12:40
Znuny Version: 4.0.6
Real Name: Jaroslav Balaž
Company: Muehlbauer AG

Kernel::System::SysConfig

Post by balazj »

Hi,

I'm trying to add new pair (key, value) to SysConfig via code in pl file. Now, I created SysConfig object, and when I do something like:

$Self->{SysConfigObject}->ConfigItemUpdate(
Valid => 1,
Key => 'DashboardBackend###0110-TicketEscalation',
Value => {
DefaultColumns => {
Stop => "1"
}
}
);

it will delete all existing key/value pairs for DashboardBackend###0110-TicketEscalation, and add only this one that I created.

I just want to add new item, not to delete them all. Is this possible?

If You are asking why I do this, answer is I'm trying to make new .opm package, and this script will write necessary changes in SysConfig.

Regards
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Kernel::System::SysConfig

Post by jojo »

just add an xml file with the necessary code. Have for example a look at the SystemMonitoring Package to see how it it solved. Please also have a look on the developer docs (http://doc.otrs.org)
"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
Locked