Configure the Risksheet attributes panel

Modified on Tue, 22 Jul at 6:04 PM

On top of the Risksheet, there is a panel in the header that shows the Risksheet document's custom fields.




TABLE OF CONTENTS


How to configure the Top Panel

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

This is being done by a configuration velocity template 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>
<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">$!document.customFields.team</div>
	  <div class="two wide column rs-label">Updated on:</div>
	  <div class="two wide column rs-value">$!document.updated</div>
</div>

Format details

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

Where to access the document

Access directly from the Risksheet interface (recommended approach)

Starting with version 25.5.0, risksheetTopPanel.vm can be edited directly from the Risksheet interface using the new configuration editor.

The built-in editor provides syntax highlighting and a seamless editing experience. 


Where to find the file: Menu > Configuration > Edit Top Panel Configuration...


Built-in Editor view

Make and save any changes directly in the editor without the need to download, edit in external tools, and re-upload.  

Saved changes are immediately applied, just reload the Risksheet page and see them being reflected.


Access from the document's attachment 


Where to find the file: Menu > Document > Open Live Document

Locate the file either in the document's or template's Attachments section.


Download the file, make all the desired modifications, and upload the file again.



What is in the Velocity Context?

You will have access to the 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)
projectId
 (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)


utilObjects:

gson (com.google.gson.Gson)

objectFactory (ObjectFactory)

esc (EscapeTool)

currentDate (new java.util.Date())

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


For any assistance, please don’t hesitate to reach out by submitting a ticket here.

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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article