> For the complete documentation index, see [llms.txt](https://doc.dastra.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.dastra.eu/en/features/contracts/versions.md).

# Document versions

To track changes, updates or the renewal of a document, create a new version of it.

Each version has a revision number, incremented automatically at creation. This number is visible in the record. A document has only one active version at a time: it is the one the record displays, and inactive versions do not appear there.

You can browse the versions of a document from the versions manager, display a previous version and make any version active at any time, including a more recent one.

## The versions manager

When you create a document, Dastra creates its version 1. The **Version** button followed by the number, in the main actions menu, opens the versions manager.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-d4260e6d0338ec923cf72e1ec942614b428dd75d%2Fcontracts-versions-1.png?alt=media" alt="The Version 1 button in the main actions menu of the record"><figcaption><p>The button that opens the versions manager</p></figcaption></figure>

The manager lists all versions of the document. Each card shows the version number, its description, its creation date and the number of its attachments. A dot gives the state of the version: green for the **Active** version, red for a **Disabled** one. The **(Currently displayed)** mention marks the version you are viewing on screen.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-52cea43637fd465162489559080434211c36c8ab%2Fcontracts-versions-2.png?alt=media" alt="The versions manager with several versions, including the active version and the displayed version"><figcaption><p>The versions manager</p></figcaption></figure>

## Create a new version

The new version starts from the version currently displayed: first go to the version you want to start from.

1. In the versions manager, click **Create a new version**.
2. Enter the **Start date** and, if needed, the **Deadline**. You can edit them later.
3. Add a **Version description** if you wish.
4. Turn on **Copy attachments in new version** to carry the files over.
5. Click **Create a new version**.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-2a112162cff04f98a5827be09a9472b2be2ce30d%2Fcontracts-versions-3.png?alt=media" alt="The window to create a version with the dates, the description and the option to copy attachments"><figcaption><p>The window to create a version</p></figcaption></figure>

The document name, description, organizational unit, assets, signers and users are kept in the new version. The created version becomes the active version, and the displayed one.

## View a version

In the versions manager, open the version menu (the three dots), then click **View**. This action is not offered for the version already displayed.

You can view and edit a version that is not the active version. Dastra reminds you with a message in the manager and with the **Inactive version** mention above the tabs of the record. Do not confuse the active version, which is unique and is the reference, with the displayed version.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-06806fffa886d458518c8d512bbecc24592c34c7%2Fcontracts-versions-4.png?alt=media" alt="A document record displaying an inactive version, with the Inactive version mention"><figcaption><p>Version 4 is the active version, but you can view and edit version 2</p></figcaption></figure>

## Make a version active

A created version automatically becomes the active version. To make another version active, open its menu in the versions manager and click **Activate**. This action is offered only for inactive versions.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-e99a4ea221cc68ab491c0048cc6dba340381c02d%2Fcontracts-versions-5.png?alt=media" alt="The menu of an inactive version with the Activate action"><figcaption><p>Set a version as the active version</p></figcaption></figure>

## Edit the description of a version

To change the description of an existing version, open its menu and click **Edit version description**. Edit the text in the window that opens, then click **Edit version**.

## Delete a version

Open the menu of an inactive version and click **Delete**. You cannot delete the active version or the version currently displayed: display another version to delete this one.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-82957fdf1175431a4a87b264073ea27d3a7f8eba%2Fcontracts-versions-6.png?alt=media" alt="The menu of an inactive version with the Delete action"><figcaption><p>Delete a version</p></figcaption></figure>

Deleting a document deletes its active version and all its inactive versions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.dastra.eu/en/features/contracts/versions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
