Проблема с ConfigItem Sub

Moderator: DenisBY

Locked
giliann13
Znuny newbie
Posts: 6
Joined: 15 Mar 2012, 10:46
Znuny Version: 3_0_10
Real Name: Dmitry Bilichenko

Проблема с ConfigItem Sub

Post by giliann13 »

Добрый вечер, подскажите как решить такую проблему :

В Настройках Ticket Settings -> Config Item Редактирую какой либо класс например Location, и пытаюсь расширить его функционал за счет добавление Sub т.е.

[
{
Key => 'Type',
Name => 'Type',
Searchable => 1,
Input => {
Type => 'GeneralCatalog',
Class => 'ITSM::ConfigItem::Location::Type',
Translation => 1,
},
},

{
Key => 'Phone1',
Name => 'Phone',
Searchable => 1,
Input => {
Type => 'Text',
Size => 50,
MaxLength => 100,
},
CountMin => 0,
CountDefault => 1,
CountMax => 10,
Sub=>[
{
Key => 'PhoneDescription',
Name => 'Phone Description',
Searchable => 1,
Input => {
Type => 'Text',
Size => 50,
MaxLength => 300,
},
CountMin => 0,
CountDefault => 0,
CountMax => 1,

},

]

},



{
Key => 'E-Mail',
Name => 'E-Mail',
Searchable => 1,
Input => {
Type => 'Text',
Size => 50,
MaxLength => 100,
},
},
{
Key => 'Address',
Name => 'Address',
Searchable => 1,
Input => {
Type => 'TextArea',
},
},
{
Key => 'Latitude',
Name => 'Latitude',
Input => {
Type => 'Text',
Size => 50,
MaxLength => 100,
},
},
{
Key => 'Longitude',
Name => 'Longitude',
Input => {
Type => 'Text',
Size => 50,
MaxLength => 100,
},
},

{
Key => 'Company',
Name => 'Company',
Searchable => 1,
Input => {
Type => 'CIClassReference',
ReferencedCIClassName => 'Company',
ReferencedCIClassLinkType => 'Includes',
ReferencedCIClassLinkDirection => 'Reverse',
Required => 1,
},
},

{
Key => 'Map_link',
Name => 'Ссылка на карту',
Searchable => 0,
Input => {
Type => 'Text',
},
},

{
Key => 'Photo_link',
Name => 'Ссылка на фотографии',
Searchable => 0,
Input => {
Type => 'Text',
},
},

{
Key => 'How_to_get_there',
Name => 'Описание и схема проезда',
Searchable => 1,
Input => {
Type => 'TextArea',
},
CountMin => 0,
CountMax => 1,
CountDefault => 0,
},


{
Key => 'POC',
Name => 'Person Of Contact',
Searchable => 1,
Input => {
Type => 'CIClassReference',
ReferencedCIClassName => 'Person',
ReferencedCIClassLinkType => 'RelevantTo',
ReferencedCIClassLinkDirection => 'Reverse',

},

CountMin => 1,
CountDefault => 1,
CountMax => 99,
Sub=>[
{
Key => 'ContactType',
Name => 'Contact Type',
Input => {
Type => 'GeneralCatalog',
Class => 'ITSM::ConfigItem::Person::Type',
ValueDefault => 'General',
},
},


{
Key => 'ContactDescription',
Name => 'Contact Description',
Input => {
Type => 'Text',
},
},

]


},


{
Key => 'AZS',
Name => 'AZS',
Input => {
Type => 'Text',
},
CountMin => 0,
CountDefault => 0,
CountMax => 1,

Sub => [
{
Key => 'ASUTP',
Name => 'ASUTP',
Input => {
Type => 'CIClassReference',
ReferencedCIClassName => 'Software',
ReferencedCIClassLinkType => 'RelevantTo',
ReferencedCIClassLinkDirection => 'Reverse',
Required => 1,
},
},


]
},
];


При редактировании (добавлении) объекта подкласс Sub обрабатывается корректно. Вопрос вот в чем:
Как сделать так, чтобы при добавлении Sub, добавлялась соответствующая связь RelevantTo c объектом Software, как например тут с кампанией и компьютерами:

Image


Спасибо!
Locked