Velocity API Help
$documentSource.getDocumentURLs( $document.id ) returns a list of DocumentUrl. What is the proper usage of this function to create a hyperlink to the item in Jama Connect?
Comments
-
Hi @Alan Bushey
if I remember correctly it is returning the links (from the Link widget).
I generate manually the item URL (via VTL macro)
<a href="$baseUrl/perspective.req#/items/$itemid?projectId=$project.id" target="_blank">$text</a>
I hope it helps,
Alessandro
Systems Engineer
SICK AG1 -
Thanks @
#macro ( getHyperlink $hldoc )## removing white space
#if ( $hldoc.Id )##
#set ( $baseUrl = $project.organization.baseUrl)##
#set ( $hldocid = $hldoc.Id )##
<a href="$baseUrl/perspective.req#/items/$hldocid?projectId=$hldoc.projectId">${hldocid}${hldoc.projectId}</a>##
#end##
#end##0 -
Seems I am unable to edit the above comment because the edit box wasn't appearing on the page. Seems to work for this comment though…
Thank you, Alessandro.I posted the macro I am currently using in the above reply as an example. I wanted to point out that you should use the project ID from the item, not from the project where the report was exported from. Jama will open a web page for the item URL, but the project loaded in the background could be incorrect if the item is from a different project.
I am still wondering what $documentSource.getDocumentURLs does since it returns a list…
0