## Script to retrieve all local and remote linked work items ## Scaling parameter to manage performance #set ( $WILimit = 100 ) ## Set Style ## Set the scope as the current project #set($projectId = $page.getReference().projectId()) #set($query = "project.id:$projectId AND HAS_VALUE:linkedOslcResources") #set($sortBy = "~id") #set($uniqueId = $renderingContext.generateUniqueElementId()) #set($link = $transaction.context().createPortalLink().project("$projectId").workItems().query("$query").sorting("$sortBy").toEncodedRelativeUrl()) #set($workItems = $transaction.workItems().search().query("$query").sort("$sortBy").limit($WILimit)) #set($workItemCount = $workItems.size())
#foreach($workItem in $workItems) #end

POLARION REQUIREMENTS

OSLC Links

$workItem.render.withTitle.withLinks
## Add polarion workitem attributes (if desired) Status: $workItem.fields().status.render.htmlFor().forFrame()
Description: $workItem.fields().description.render.htmlFor().forFrame()
## Loop through the OSLC links #foreach($link in $workItem.fields.linkedOslcResources) $link.render.remote(true).withIcon.withLinks.openLinksInNewWindow
## Provide all of our Linked artifact attributes
Type: $link.resource.property('{http://purl.org/dc/terms/}type').render
ID: $link.resource.property('{http://purl.org/dc/terms/}identifier').render
Jira Status: $link.resource.property('{http://open-services.net/ns/cm#}status').render
Priority: $link.resource.property('{http://atlassian.com/ns/cm#}priority').render
Description: $link.resource.property('{http://purl.org/dc/terms/}description').render

#end