Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JETI remove velocity spacing in template

Ryan L
Contributor
June 12, 2018

I am stuck at a simple yet annoying issue. I have a JETI e-mail setup with velocity to check the values of a customfield, if the field has a value it will add text and the field value to a string variable ($email) then output the string in the email body. However it leaves a giant white space in the e-mail. How can i remove this white space?

 

example of code:

#if($!jetiFieldRenderer.renderCustomField($issue, 'customfield_11801'))
#set($email = "$email $newline Department: #renderCustomField($issue, 'customfield_11801')")
#end
#if($!jetiFieldRenderer.renderCustomField($issue, 'customfield_11713'))
#set($email = "$email $newline Start Date: #renderCustomField($issue, 'customfield_11713')")
#end
#if($!jetiFieldRenderer.renderCustomField($issue, 'customfield_11804'))
#set($email = "$email $newline Location: #renderCustomField($issue, 'customfield_11804')")
#end

....

$email

1 answer

1 accepted

1 vote
Answer accepted
Ryan L
Contributor
June 12, 2018

I found the problem. 

I originally wrote the code in notepad++ and pasted it into JETI as it's easier to manipulate and work on, however that caused the lines in the code to be "different" it was seen as the same block in the source code, as everything i typed in JETI there was wrapped with <p></p>, while the code i pasted in was a single line with </ br> 

I basically had to go line by line in JETI, go to the end of the line, press DEL to bring the next line up then hit Enter again to put in the proper line spacing. 

 

This is how is should look with the properly line spacing

#if($!jetiFieldRenderer.renderCustomField($issue, 'customfield_11801'))

#set($email = "$email $newline Department: #renderCustomField($issue, 'customfield_11801')")

#end

#if($!jetiFieldRenderer.renderCustomField($issue, 'customfield_11713'))

#set($email = "$email $newline Start Date: #renderCustomField($issue, 'customfield_11713')")

#end

#if($!jetiFieldRenderer.renderCustomField($issue, 'customfield_11804'))

#set($email = "$email $newline Location: #renderCustomField($issue, 'customfield_11804')")

#end

Suggest an answer

Log in or Sign up to answer