Skip to main content

Prerequisites

Approach Overview

Risksheet provides three approaches for making content clickable in grid cells. Choose the one that fits your use case:
ApproachConfigurationEditableBest For
Rich text field renderingserverRender with .render().htmlFor().forFrame()No (read-only)Fields that already contain HTML links
Custom redirect linkserverRender with HTML <a> tagNo (read-only)Navigating to Polarion pages or external URLs
Context menu navigationNo configuration neededN/AQuick access to linked work items
diagram If the work item field contains rich text with embedded hyperlinks (for example, a description field with <a href="..."> tags), use the Velocity rendering API to preserve the HTML and make links clickable:
{
  "columns": [
    {
      "id": "richDescription",
      "header": "Description",
      "serverRender": "$item.fields().description().render().htmlFor().forFrame()"
    }
  ]
}
This renders the full HTML content of the description field, including clickable links, bold/italic formatting, lists, and embedded images. The .htmlFor().forFrame() method chain ensures the content is rendered safely within the Risksheet grid frame. For other rich text fields (not description), use the generic get() method with the field ID:
{
  "columns": [
    {
      "id": "customRichField",
      "header": "Notes",
      "serverRender": "$item.fields().get('notes').render().htmlFor().forFrame()"
    }
  ]
}
When you set serverRender on a column, the column automatically becomes type: "text" and readOnly: true. Users cannot edit the field content directly in the grid. Editing must be done through the Polarion work item editor. This protects the underlying rich text formatting from being stripped during cell editing.
To create a clickable link that navigates to a specific Polarion page or external URL based on a field value, construct an HTML anchor tag in the Velocity script.
{
  "columns": [
    {
      "id": "detailLink",
      "header": "Details",
      "serverRender": "<a href='/polarion/redirect/project/$item.getProjectId()/wiki/DetailPage/$item.fields().get('customField').get()' target='_blank'>View Details</a>"
    }
  ]
}
If the work item stores a URL in a custom field, render it as a clickable link with a null-check to handle empty values:
{
  "columns": [
    {
      "id": "externalLink",
      "header": "External Reference",
      "serverRender": "#set($url = $item.fields().get('externalUrl').get())#if($url)<a href='$url' target='_blank'>$url</a>#else-#end"
    }
  ]
}
This Velocity expression checks whether the externalUrl field has a value. If the field is populated, it renders a clickable link. If the field is empty, it displays a dash placeholder. To create a link that opens a related work item in Polarion:
{
  "columns": [
    {
      "id": "relatedItemLink",
      "header": "Related Item",
      "serverRender": "#set($ref = $item.fields().get('relatedItemId').get())#if($ref)<a href='/polarion/redirect/project/$item.getProjectId()/workitem?id=$ref' target='_blank'>$ref</a>#else-#end"
    }
  ]
}
Always add target='_blank' to anchor tags in serverRender expressions. This opens the link in a new browser tab, keeping the Risksheet page intact. Without this attribute, clicking the link navigates away from the current page.
You can combine Velocity conditionals with link rendering to display different content based on field values:
{
  "columns": [
    {
      "id": "statusLink",
      "header": "Review Link",
      "serverRender": "#set($status = $item.getStatus().getId())#if($status == 'reviewed')<a href='/polarion/redirect/project/$item.getProjectId()/workitem?id=$item.getId()' target='_blank' style='color:green'>Reviewed</a>#elseif($status == 'draft')<span style='color:gray'>Draft</span>#else<a href='/polarion/redirect/project/$item.getProjectId()/workitem?id=$item.getId()' target='_blank' style='color:orange'>Pending</a>#end"
    }
  ]
}
This renders different link styles depending on the work item status — green for reviewed items, gray text (no link) for drafts, and orange for items pending review.

Context Menu Navigation (No Configuration Needed)

Even without serverRender configuration, users can navigate to linked items using the right-click context menu on any grid cell:
Menu OptionAvailable WhenAction
Open Row ItemAlways availableOpens the current row’s work item in the Polarion item editor
Open Linked ItemCell contains a valid item link (not a new unsaved * item)Opens the linked work item; label derived from level definition or column header
Open Task ItemCell contains a task linkOpens the task work item; label uses dataTypes.task.name if configured
These context menu options require no serverRender configuration and work with standard itemLink, multiItemLink, and taskLink column types.

Export Behavior for Server-Rendered Columns

Server-rendered columns export differently from standard editable columns. Be aware of these differences when users export to Excel or PDF:
Export FormatBehavior
ExcelHTML content is stripped to plain text. List structures (<li> elements) are converted to newline-separated text. Anchor tags are removed, leaving only the link text.
PDFHTML content is converted to plain text. Clickable links are not preserved in the PDF output.
If you see the warning “Invalid column config, itemLink bindings without dot” in the server logs, your itemLink column binding is missing a dot-separated property path (for example, binding: "requirement" instead of binding: "requirement.id"). Ensure itemLink bindings use the correct field.property format.
For more control over export formatting, see Export to Excel and Customize PDF Export Scripts.

Troubleshooting

Links are not clickable — Verify the Velocity expression produces valid HTML anchor tags. Open browser developer tools (F12), inspect the cell element, and check whether the rendered output contains <a href="..."> tags. If the cell shows plain text instead of a link, the serverRender expression may have a syntax error. Column shows raw Velocity syntax instead of rendered content — This indicates a Velocity parsing error. Common causes include:
  • Missing #end for #if or #foreach blocks
  • Unclosed string literals (mismatched quotes)
  • Incorrect variable references (variables must start with $)
  • Field name mismatch (the field ID in get('fieldName') does not exist on the work item type)
Duplicate item link error — If you see “This item is already linked to selected row” when using itemLink or multiItemLink columns, the work item you are trying to link is already associated with the current row. The editor enforces uniqueness to prevent duplicate references.
Velocity API methods can vary across Polarion versions. Test serverRender scripts in a development or sandbox environment before deploying to production Risksheet documents. Use the Polarion developer tools or a test document to verify the output.

Verification

After saving your risksheet.json changes:
  1. Reload the Risksheet page in your browser
  2. Locate the column you configured with serverRender
  3. You should now see clickable links in the configured column — the text should appear as blue underlined hyperlinks
  4. Click a link to confirm it opens the correct target in a new browser tab
  5. Right-click a different cell and verify the context menu shows “Open Row Item” as expected

See Also

KB ArticlesSupport TicketsSource Code
  • PolarionAppConfigManager.java
  • AppConfig.ts
  • CellEditorFormatter.ts
  • RiskSheetContextMenu.ts
  • risksheet.json