I am trying to print a multi-line workflow property in an email notifier, however it is being displayed in a single line rather than multiple lines.
My property looks like something this:
rpm1 rpm2 rpm3 rpm4
It is being displayed like this in the email:
rpm1 rpm2 rpm3 rpm4
Snippet from email body template:
Installed Software
$[/myWorkflow/installedRpmList]
Answer by mike westerhof · Oct 16, 2014 at 10:10 AM
This is a feature of HTML -- unless you tell it otherwise, it assumes that line breaks are just like any other white space.
Option a) Use javascript to translate the newline characters to the HTML tag <br/> -- which is an HTML line break.
Option b) Use the <pre> tag to tell it that the text is "preformatted", which in addition to some other stuff will preserve your newlines. That would look like:
<H3>Installed Software</H3> <pre>$[/myWorkflow/installedRPMList]</pre>
How do I create an email notifier that will go to the submitter of a job? 1 Answer
email only when different outcome 3 Answers
How can I use ectool to set a multi line value in ElectricCommander? 4 Answers
How can I encapsulate html in properties to display on the UI? 3 Answers
How to add a link to a report in email template which gets created in artifacts directory 1 Answer
Electric Cloud powers Continuous Delivery, helping organizations developing deliver better software faster by automating and accelerating build, test, and deployment processes at scale. Industry leaders like Qualcomm, SpaceX, Cisco, GE, Gap, and E*TRADE use Electric Cloud solutions to boost DevOps productivity and Agile throughput.