Hi All,
I want to convert a plain String to a URL(clickable link) in a vm file. I have tried using $link.encode(String) but it takes as a literal. That is , it just prints "$link.encode(String)", doesnt encode. I am not sure what do I have to enable and where in jira. Please suggest. We are using jira 6.0.8 currently which will be upgraded shortly to the latest version.
Thanks,
Hemanth
Hi! :)
Have you tried this one:
| ib.name | ||||||||
| Escapes the characters in a  
 String,nullif null string input</dd></dl>Delegates the process to java.net.URLEncoder#encodeURL(String,"UTF-8"). If  
 then the following Velocity script: 
 produces this output: 
 Source: http://velocity.apache.org/tools/devel/generic/EscapeTool.html#url() The other option would be ( https://velocity.apache.org/tools/devel/velocity-tools-generic/apidocs/org/apache/velocity/tools/ConversionUtils.html#toURL(java.lang.String) ): toURLpublic static URL toURL(String value)<dl><dd>Converts a string to a URL. It will first try to treat the string as a File name, then a classpath resource, then finally as a literal URL. If none of these work, then this will returnnull.</dd><dd><dl><dt>Parameters:</dt><dd> value- - the string to parse</dd><dt>Returns:</dt><dd>theURLform of the string ornull</dd><dt>See Also:</dt><dd>File,ClassUtils.getResource(String,Object),URL</dd><dd></dd><dd></dd></dl></dd></dl> | ||||||||
I'm trying the following in a macro:
$esc.url($url)
However, I just see the same output: $esc.url($url)
Any assistance would be appreciated
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.