Skip to main content

Why Configure a Target Document

By default, when you create a new linked work item from a Risksheet column, the item is stored in the Polarion tracker rather than in a specific document. For regulated workflows (FMEA, HARA), you typically need new risk controls, mitigation tasks, or verification activities stored in designated documents to maintain document-level traceability. The createInDocument parameter lets you specify exactly which document receives new items, independently of where existing items are loaded from. diagram The read and write paths are completely independent. You can load items from the entire project while creating new ones in a specific document.

Step 1: Configure for Downstream Items

For downstream task and mitigation items, place createInDocument inside the dataTypes section of your risksheet.json:
{
  "dataTypes": {
    "task": {
      "type": "mitigationAction",
      "role": "mitigates",
      "createInDocument": "Risks/Tasks"
    }
  }
}
The createInDocument value uses the folder/docID path format, matching the Polarion document structure.
If createInDocument is not set, newly created linked items are stored in the project’s work item tracker rather than in any document. This breaks document-based traceability and audit trails required for ISO 26262 and ISO 14971 compliance.

Step 2: Configure for Upstream Items

For upstream linked items, place createInDocument in the column’s typeProperties:
{
  "columns": [
    {
      "header": "System Req",
      "binding": "sysReq",
      "type": "itemLink",
      "typeProperties": {
        "linkTypes": "systemRequirement",
        "linkRole": "refines",
        "createInDocument": "Requirements/SystemReqs"
      }
    }
  ]
}
Item DirectionConfiguration LocationExample
Downstream (tasks, measures)dataTypes.task.createInDocument"Risks/Tasks"
Upstream (requirements, links)columns[].typeProperties.createInDocument"Requirements/SystemReqs"

Step 3: Use createInCurrentDocument for Document-Scoped Items

When you want new items stored in the current document rather than a separate one, use createInCurrentDocument:
{
  "typeProperties": {
    "linkTypes": "riskControl",
    "linkRole": "controls",
    "createInCurrentDocument": true
  }
}
This is useful when each Risksheet document should contain its own risk items rather than storing them in a shared document.
For itemLink and multiItemLink columns that load items from multiple projects, use createInCurrentDocument: true to ensure new items are always stored in the current project’s document context.

Common Pattern: Load Project-Wide, Create in Specific Document

A frequent configuration pattern loads existing items from the entire project (no document parameter) while directing new items to a specific document:
{
  "dataTypes": {
    "task": {
      "type": "mitigationAction",
      "role": "mitigates",
      "query": "type:mitigationAction",
      "createInDocument": "Risks/MitigationTasks"
    }
  }
}
This loads all mitigation actions from the project but creates new ones exclusively in Risks/MitigationTasks.

Limitations

LimitationNotes
No chapter-level placementRisksheet creates items at the document level; placement within specific chapters or headings is not supported
Target document must existThe document specified in createInDocument must already exist in the Polarion project structure
Path format is fixedUse folder/docID format only — no wildcards or expressions
Reading document custom field values dynamically in risksheet.json (e.g., referencing a subsheetName custom field) is not natively supported. If you need dynamic document targets, consider using importer scripts to populate the configuration before opening the Risksheet.

Verification

After configuring createInDocument:
  1. Open the Risksheet document and create a new downstream task or linked item
  2. Save the document
  3. Navigate to the target document in Polarion
You should now see the newly created work item stored in the specified target document rather than in the project tracker.

See Also

KB ArticlesSupport TicketsSource Code
  • RisksheetViewServlet.java
  • ExportToPdf.ts
  • PdfExportConfigurationService.java
  • DocumentConfigProvider.java
  • NewBaselineCommand.ts