I am writing a Workflow validator plugin. When displaying the error message I need a few new lines.
I tried adding \n and <br /> as part of my string but didnt work.
Can anyone please help me out with this?
Community moderators have prevented the ability to post new answers.
The message is escaped, so I don't think you can without changing the velocity template, ie macros.vm.
Call addError method of InvalidInputException class for each new line of the error message.
For example:
InvalidInputException error= new InvalidInputException()
Instead of error.addError("First line. \n Second line")
try error.addError("First line")
error.addError("Second line")
Output will now be :
First line
Second line
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't seem to work anymore :-/ Jira 7.13.5. It only display the first part of the error (eg, the line added by the first addError call).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.