Multiline sercive catalog comment

English! place to talk about OTRS development, programming and coding
Post Reply
kkgigiioo
OTRS newbie
Posts: 22
Joined: 06 Mar 2019, 09:26
OTRS Version?: 6.0.15

Multiline sercive catalog comment

Post by kkgigiioo » 06 Mar 2019, 11:04

Hi all,

Firstly, sorrry my English, but I'm an hungarian man.
I have a litle problem... The company where I work use the OTRS and now they want to introduce the service catalog. I read the manual and I went afer the Perl, but I don't see answer my question.

My problem is: In the comment field of the service catalog only one line is saved, I cannot insert a line break. I tried the replace() function but it says "CODE(0x560f2f3222d8).

I know that the text field is a comment, but I copied it to the Custom folder and replaced it with textarea so that I can enter multi lines.
However, as I looked into the database, it only loads one line. I tried the html_break, html_line_break commands but haven't effect. IAnd we use postgreSQL.

Regards,
Thank you for your answer!

kkgigiioo

reneeb
OTRS guru
Posts: 4795
Joined: 13 Mar 2011, 09:54
OTRS Version?: 3.3.x
Company: Perl-Services.de
Contact:

Re: Multiline sercive catalog comment

Post by reneeb » 08 Mar 2019, 11:33

Please show some code...
Perl / OTRS development: http://perl-services.de
Free OTRS add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de

kkgigiioo
OTRS newbie
Posts: 22
Joined: 06 Mar 2019, 09:26
OTRS Version?: 6.0.15

Re: Multiline sercive catalog comment

Post by kkgigiioo » 11 Mar 2019, 10:55

Okay, I'm trying to copy the essence.

Code: Select all

	<div class="Content AutoHeight">
		<fieldset class="TableLike FixedLabelSmall">
			<label title="[% Translate("Type") | html %]">[% Translate("Type") | html %]: </label>
			<div class="Field">
				[% Translate(Data.Type) | html %]
			</div>
			<div class="Clear"></div>
			
			<label>[% Translate("Criticality") | html %]: </label>
			<div class="Field">
				[% Translate(Data.Criticality) | html %]
			</div>
			<div class="Clear"></div>
			
			<label title="[% Translate("Comment") | html %]">[% Translate("Comment") | html %]: </label>
			<div class="Field">
				[% Translate(Data.Comment) | html_line_break | html %]
			</div>
			<div class="Clear"></div>
		</fieldset>
	</div>
And if [% Translate(Data.Comment) | html_line_break | html %] instead of [% Translate(Data.Comment) | replace('\.',\r\n) | html %], then write down the error code mentioned above

Post Reply