> ## 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.

# Dependency Metadata Storage

> Understand how Nextedy GANTT stores advanced dependency type and lag information in the `gantt_dependency_metadata` custom field, and configure it correctly for your project.

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>;
};

## What the Metadata Field Stores

When you enable [advanced dependency types](/gantt/guides/dependencies/advanced-dependency-types), the Gantt needs to store two additional pieces of information for each dependency link that Polarion's native link roles do not capture:

* **Dependency type** -- which of the four types (FS, SS, FF, SF) the link uses
* **Lag** -- how many days of delay or lead time apply to the link

This information is persisted in a custom field called `gantt_dependency_metadata` on the work item. The field stores a JSON-serialized map that associates each linked target work item ID with its dependency type code and lag value.

<Frame>
  <img src="https://mintcdn.com/none-17b4493f/DDjWgCW2DWY5biNv/gantt/diagrams/guides/dependencies/dependency-metadata/diagram-1.svg?fit=max&auto=format&n=DDjWgCW2DWY5biNv&q=85&s=6ad3b1e8e8c23057302ad26ff151ba70" alt="diagram" style={{ maxWidth: "600px", width: "100%" }} width="600" height="140" data-path="gantt/diagrams/guides/dependencies/dependency-metadata/diagram-1.svg" />
</Frame>

<Steps>
  <Step title="Verify the Custom Field Exists">
    The `gantt_dependency_metadata` field must be defined as a custom field on the relevant work item types before advanced dependency data can be stored -- the Gantt does not create Polarion custom field definitions for you. Some project templates (such as the Gantt Demo) already include it. Confirm it exists, and create it if it does not:

    1. Navigate to **Administration > Custom Fields** for your project.
    2. Search for `gantt_dependency_metadata`.
    3. If it is missing, add it; verify it is of type **String** or **Text**.

    <Warning title="Do not rename or delete this field">
      The Gantt reads and writes to this field by its exact ID `gantt_dependency_metadata`. Renaming, deleting, or changing its type will cause all advanced dependency type and lag data to be lost.
    </Warning>
  </Step>

  <Step title="Hide the Field from End Users">
    The metadata field contains a JSON structure that is not meant for manual editing. Hide it from work item forms:

    1. Open **Administration > Form Configuration** for each relevant work item type.
    2. Locate `gantt_dependency_metadata` in the field list.
    3. Set it to **hidden** so it does not appear on the form layout.

    | Action                | Result                                                                         |
    | --------------------- | ------------------------------------------------------------------------------ |
    | Field visible on form | Users may accidentally edit or clear the JSON, breaking dependency metadata    |
    | Field hidden on form  | Metadata is managed exclusively by the Gantt, preventing accidental corruption |
  </Step>

  <Step title="Enable Advanced Dependencies">
    If you have not already done so, add the following to **Project / Repository Administration > Configuration Properties**:

    ```
    nextedy.gantt.default.advanced_dependencies=true
    ```

    Without this property, the Gantt does not read or write to the metadata field, and all dependency links default to Finish-to-Start (type `0`).
  </Step>
</Steps>

## How Data Flows

When you create or modify a dependency link in the Gantt chart:

1. The Gantt creates (or updates) a Polarion work item link using the configured link role.
2. The Gantt writes the dependency type code and lag value into the `gantt_dependency_metadata` field on the source work item as a JSON entry keyed by the target work item ID.
3. When the chart loads, the Gantt reads the metadata field to restore the correct dependency type and lag for each link.

When you delete a dependency link:

1. The Polarion work item link is removed.
2. The corresponding entry in `gantt_dependency_metadata` is also removed.

<Tip title="Metadata survives link role changes">
  If you change the Dependency Role configuration, existing metadata entries remain in the custom field. The Gantt will re-associate them with the new link role on the next load.
</Tip>

## Verification

You should now see:

* The `gantt_dependency_metadata` field listed in your project's custom fields
* The field hidden from work item forms
* Advanced dependency types (SS, FF, SF) and lag values preserved correctly after saving and reloading the Gantt chart

## See Also

* [Configure Advanced Dependency Types (FS, SS, FF, SF)](/gantt/guides/dependencies/advanced-dependency-types)
* [Configure Link Lag and Delay](/gantt/guides/dependencies/link-lag)
* [Create and Configure Dependency Links](/gantt/guides/dependencies/create-dependency-links)

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