Multiline sercive catalog comment

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

Multiline sercive catalog comment

Post by kkgigiioo »

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
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Multiline sercive catalog comment

Post by reneeb »

Please show some code...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
kkgigiioo
Znuny newbie
Posts: 22
Joined: 06 Mar 2019, 09:26
Znuny Version: 6.0.15

Re: Multiline sercive catalog comment

Post by kkgigiioo »

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