> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nextedy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hierarchy and Traceability

> Nextedy POWERSHEET is well-suited for organizations that manage structured hierarchical data -- whether tracing requirements across abstraction levels, managing risk analyses, or organizing any domain with nested parent-child structure.

export const LastReviewed = ({date}) => {
  if (!date) return null;
  const formatted = new Date(`${date}T00:00:00Z`).toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric",
    timeZone: "UTC"
  });
  return <p className="mt-10 text-sm text-gray-400 dark:text-zinc-500 not-prose">
      Last reviewed on {formatted}
    </p>;
};

## The Traceability Challenge

Polarion stores traceability as individual links between work items. While each link is correct in isolation, understanding the full chain -- from a user need through system requirements to design requirements to hazards to risk controls -- requires mentally assembling dozens of separate work item views. This is like reading a book one sentence at a time from different chapters: technically possible, but practically unusable for analysis.

Powersheet solves this by rendering the entire traceability chain as a single hierarchical sheet, where parent-child nesting shows the relationships and every level is editable in place.

## How Hierarchy Maps to the Data Model

The hierarchy displayed in a Powersheet sheet is defined by two configuration layers working together:

1. **Data model** -- defines entity types (e.g., `UserNeed`, `SystemRequirement`, `DesignRequirement`) and the `relationships` between them, including cardinality, storage mechanism, and navigation property names
2. **Sheet configuration** -- defines which columns to show, how to sort and group rows, and which `sources` with `expand` clauses to use for loading related entities

The data model provides the structural skeleton. The sheet configuration decides which parts of that skeleton to display and how.

<Frame>
  <img src="https://mintcdn.com/none-17b4493f/3Zik2OH750CE3kB4/powersheet/diagrams/concepts/hierarchy-and-traceability/diagram-1.svg?fit=max&auto=format&n=3Zik2OH750CE3kB4&q=85&s=d8e4ca5f95eefe69bba9a92bfd816a8a" alt="diagram" style={{ width: "580px", maxWidth: "100%" }} width="580" height="260" data-path="powersheet/diagrams/concepts/hierarchy-and-traceability/diagram-1.svg" />
</Frame>

## Row Levels and Expansion Paths

<Frame>
  <img src="https://mintcdn.com/none-17b4493f/KGc-UcQNrDeK-NiS/powersheet/images/48001275640/6.png?fit=max&auto=format&n=KGc-UcQNrDeK-NiS&q=85&s=5a62308b3bd3eb5d7a39a0575693c6c9" alt="Work Items tree breadcrumb in the Powersheet toolbar showing the active row hierarchy: User Need, Design Input (selected, with open-in-form, unlink, delete, and add actions), and Design Output" style={{ maxWidth: "720px", width: "100%" }} width="944" height="114" data-path="powersheet/images/48001275640/6.png" />
</Frame>

When a sheet loads data, it starts with a root entity type (defined by `sources[].query.from`) and follows **expansion paths** to load related entities. Each expansion creates a new row level in the hierarchy:

* **Level 0 (upstream)** -- the root entity (e.g., `UserNeed`). Always present, with no back reference.
* **Level 1 (downstream)** -- first-level related entities (e.g., `SystemRequirement`), loaded by expanding a navigation property.
* **Level 2+** -- deeper related entities (e.g., `DesignRequirement`), loaded by nested expansions.

Each downstream level maintains a **back reference** to its parent navigation property, preserving the parent-child relationship for rendering and editing.

```yaml theme={null}
sources:
  - id: rtm
    title: Requirements Traceability
    model: rtm
    query:
      from: UserNeed
    expand:
      - name: systemRequirements
        title: System Requirements
        expand:
          - name: designRequirements
            title: Design Requirements
```

The nested `expand` structure mirrors the hierarchy you want to see in the sheet. Each `name` must reference a navigation property defined in the data model `relationships` section.

## Cardinality and Row Nesting

The `cardinality` of each relationship determines how many child rows appear beneath a parent:

| Cardinality    | Behavior in Sheet                                                                   |
| -------------- | ----------------------------------------------------------------------------------- |
| `one-to-many`  | Parent row expands to show multiple child rows                                      |
| `many-to-one`  | Multiple parent rows share a single child reference                                 |
| `many-to-many` | Parent row expands to multiple children; children may appear under multiple parents |
| `one-to-one`   | Parent row has exactly one child row                                                |

Most traceability relationships use `one-to-many` or `many-to-many`, as requirements typically refine into multiple downstream items and can be traced to multiple upstream sources.

<Tip title="Practical Rule">
  The `one-to-many` cardinality is the most common for traceability chains. A single `UserNeed` typically decomposes into multiple `SystemRequirement` items, each of which may decompose into multiple `DesignRequirement` items.
</Tip>

## Column Binding Paths Across Levels

Columns in the sheet configuration use dot-separated **binding paths** that traverse navigation properties to reach properties on related entities. The binding path determines which row level the column belongs to:

```yaml theme={null}
columns:
  # Level 0: UserNeed properties
  title:
    title: User Need
    width: 250
    hasFocus: true

  # Level 1: SystemRequirement properties
  systemRequirements.systemRequirement.title:
    title: System Requirement
    width: 200

  # Level 2: DesignRequirement properties
  systemRequirements.systemRequirement.designRequirements.designRequirement.title:
    title: Design Requirement
    width: 200
```

## Relationships and Polarion Link Roles

Every relationship in the data model maps to a Polarion **link role** via the `linkRole` property. The link role must exist in your Polarion project configuration. The `storage` property (typically `linkedWorkItems`) specifies that the relationship is persisted using Polarion's native work item linking mechanism.

```yaml theme={null}
relationships:
  - from: UserNeed
    to: SystemRequirement
    cardinality: one-to-many
    storage: linkedWorkItems
    linkRole: refines
    direct:
      name: systemRequirements
    back:
      name: userNeed
```

<Warning title="Entity Names vs Work Item Types">
  The `from` and `to` values in relationships must reference `domainModelTypes` names -- not Polarion work item type IDs. This is a common source of configuration errors.
</Warning>

## Constraints and Scoping

Entity types can define `constraints` that scope which items appear at each level of the hierarchy. Constraints support three operations:

* **`load`** -- filters which entities are loaded and displayed
* **`create`** -- restricts where new entities can be created (by document folder, name, or type)
* **`pick`** -- filters which entities appear in relationship pickers

These constraints ensure that the traceability hierarchy reflects your process requirements -- for example, ensuring that `SystemRequirement` items can only be picked from documents of a specific type.

<Info title="Verify in application">
  The interaction between constraints defined at the entity type level and constraints defined on navigation properties should be verified against your specific data model, as constraint resolution follows a layered evaluation approach.
</Info>

## Related Pages

* [Navigation Properties](/powersheet/concepts/navigation-properties) -- how traversal between entity types works
* [Entity Types and Relationships](/powersheet/concepts/entity-types-and-relationships) -- defining the data model structure
* [Link Cardinality](/powersheet/concepts/link-cardinality) -- understanding relationship multiplicity
* [Process Constraints](/powersheet/concepts/process-constraints) -- enforcing rules through data model constraints
* [Model-Driven Design](/powersheet/concepts/model-driven-design) -- why the data model drives the sheet behavior

<LastReviewed date="2026-07-02" />
