Configure the risksheet attributes panel

Modified on Sat, 26 Mar 2022 at 09:40 AM

On top of the risksheet view, there is a panel in the header that shows the risksheet document custom fields.

It is possible to configure what fields are visible in this area.  

This is being done by a configuration file: risksheetTopPanel.vm

<div class="row">
	  <div class="one wide column rs-label">Item:</div>
	  <div class="four wide column rs-value">$!document.customFields.item</div>
	  <div class="two wide column rs-label">Owner:</div>
	  <div class="four wide column rs-value">$!document.customFields.owner</div>
	  <div class="two wide column rs-label">Version:</div>
	  <div class="two wide column rs-value">$!document.customFields.version</div>
<div class="row">
	  <div class="one wide column rs-label">Model:</div>
	  <div class="four wide column rs-value">$!document.customFields.model</div>
	  <div class="two wide column rs-label">Core Team:</div>
	  <div class="four wide column rs-value">$!</div>
	  <div class="two wide column rs-label">Updated on:</div>
	  <div class="two wide column rs-value">$!document.updated</div>


  • The document output shall be an HTML document
  • You can use velocity scripting there. 
  • Most importantly - you can refer to any LiveDoc document custom field 
    • See: $!document.customFields.version

Where to put the document

Similar to the configuration of the table columns, you can:

a) configure the setting specifically for the opened document

b) or configure the default settings per document template.

A) Configure Header for Opened Document

  1. Open the live document

  2. Open attachments panel

  3. Attach the risksheetTopPanel.vm to the document

    1. If it is already attached there - click the Overwrite button

  4. and save the document

B) Configure Header for all the documents based on the same template

  1. Open the live document

  2. Check that it is connected with a template:
    1. Open document properties

    2. The custom field (id:templateDoc) must point to the document template. Open the document template by clicking on the document icon (see picture)

      1. If such document custom field does not exist, create one in polarion admnistration

  3. Attach the configuration document to the template document, by following chapter points 2-4 from chapter A) Configure Header for Opened Document

What is in the Velocity Context?

basically you have access to document via:

document - com.nextedy.risksheet.model.Document

doc - com.nextedy.risksheet.polarion.RisksheetPolarionServiceImpl.wrapDocument(IModule, ReadOnlyTransaction).objRen

doc.getOldApi() -  com.polarion.alm.tracker.model.IModule

documentId (java.lang.String)

you can also access:

tx - com.polarion.alm.shared.api.transaction.ReadOnlyTransaction

transaction = tx - com.polarion.alm.shared.api.transaction.ReadOnlyTransaction

documentId - String - "spaceId/documentId" of the document 

projectId - String - project id

old Polarion services:

trackerService ($ITrackerService)
securityService (ISecurityService)
txService (ITransactionService)

repositoryService (IRepositoryService)


gson (

objectFactory (ObjectFactory)

esc (EscapeTool)

currentDate (new java.util.Date())

calendar ( java.util.Calendar.getInstance())

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article