Настройка формы создания билета заказчиком

Обсуждение вопросов и решений

Модератор: ykolesnikov

Ответить
trudelmer
OTRS Новобранец
Сообщения: 1
Зарегистрирован: 09 мар 2016, 18:33

Настройка формы создания билета заказчиком

Сообщение trudelmer » 09 мар 2016, 18:39

Hello, I'm trying to make a customization but as I am not Perl programmer I tended difficulty.
Здравствуйте, я пытаюсь сделать настройки, но так как я не программист Perl я, как правило трудности.

1 - Added two new fields in the table ARTICLE
Добавлены два новых поля в таблице ARTICLE

alter table ARTICLE add fl1 VARCHAR2(250) NULL;
alter table ARTICLE add fl2 VARCHAR2(250) NULL;


2 - I added the hidden fields in the form /opt/otrs/Kernel/Output/HTML/Templates/Standard/CustomerTicketMessage.tt
Я добавил скрытые поля в виде ...

<input type="hidden" value="abcd" name="fl1" id="fl1">
<input type="hidden" value="efgh" name="fl2" id="fl2">

3 - /opt/otrs/Kernel/System/Ticket/Article.pm did change the file to the database
283 return if !$DBObject->Do(
284 SQL => 'INSERT INTO article '
285 . '(ticket_id, article_type_id, article_sender_type_id, a_from, a_reply_to, a_to, '
286 . 'a_cc, a_subject, a_message_id, a_message_id_md5, a_in_reply_to, a_references, a_body, a_content_type, '
287 . 'content_path, valid_id, incoming_time, create_time, create_by, change_time, change_by, fl1, fl2) '
288 . 'VALUES '
289 . '(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, current_timestamp, ?, current_timestamp, ?, ?, ?)',
290 Bind => [
291 \$Param{TicketID}, \$Param{ArticleTypeID}, \$Param{SenderTypeID},
292 \$Param{From}, \$Param{ReplyTo}, \$Param{To},
293 \$Param{Cc}, \$Param{Subject}, \$Param{MessageID},
294 \$Param{MD5},
295 \$Param{InReplyTo}, \$Param{References}, \$Param{Body},
296 \$Param{ContentType}, \$Self->{ArticleContentPath}, \$ValidID,
297 \$IncomingTime, \$Param{UserID}, \$Param{UserID},
298 \$Param{fl1}, \$Param{fl2},
299 ],
300 );

4 - Also changed the /opt/otrs/Kernel/Modules/CustomerTicketMessage.pm file to see if it works
538 # create new ticket, do db insert
539 my $TicketID = $TicketObject->TicketCreate(
540 QueueID => $NewQueueID,
541 TypeID => $GetParam{TypeID},
542 ServiceID => $GetParam{ServiceID},
543 SLAID => $GetParam{SLAID},
544 Title => $GetParam{Subject},
545 PriorityID => $GetParam{PriorityID},
546 Priority => $GetParam{Priority},
547 fl1 => $GetParam{fl1},
548 fl2 => $GetParam{fl2},

But when the form is submitted (the customer at ticket creation) data is not recorded in the database. There is also no error message, the ticket is created normally.
Any programmer could tell me where I am going wrong? I missed define something in a file?
I appreciate any help. Thank you

Но когда форма была отправлена (клиенту при создании билета) данные не будут записаны в базу данных. Там также не сообщение об ошибке, билет создается в обычном режиме.
Любой программист может сказать мне, где я неправильно? Я пропустил что-то определить в файле?
Я признателен за любую помощь. спасибо

Google Translate

alexus
OTRS Гуру
Сообщения: 5192
Зарегистрирован: 20 сен 2010, 18:17
Откуда: Москва
Благодарил (а): 92 раза
Поблагодарили: 82 раза

Re: Настройка формы создания билета заказчиком

Сообщение alexus » 10 мар 2016, 08:53

1. Недьзя править оригинальные файлы. Нужно помещать их в Custom
2. Задача-то вообще какая стоит?
С уважением,
Алексей Юсов

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

Radiant System OTRS Intergrator RU
Группа OTRS Community в Teleram
Хотите внедрить OTRS? Спросите меня как!

Ответить