﻿# Drafts of documents and document versions

> [HTML Version](draft-doc.html)

**Draft** is a document status that allows users to edit it online without creating intermediate versions every time changes are saved.

Drafts can be used in two scenarios:

- New document draft. Upload a document to the system in the draft status if it does not have a current main version yet.

- Document version draft. Prepare changes for an existing document without changing its current working version.

## General draft workflow

1. **Preparation**. Upload a new document draft or create a version draft in the system.

2. **Editing**.** **Edit the draft online as many times as needed. Intermediate versions are not created and are not recorded in the version history.

3. **Publishing**. Once the preparation is finished, publish the draft to mark it as the current version. Users with view permissions will then see it as the main document.

## Differences between new document drafts and version drafts

| | | |
|------|------|------|
| **Feature** | **New document draft** | **Document version draft** |
| **Purpose** | Prepare a new document before the first published version appears | Prepare edits for a document with an already published version |
| **Current version** | None | Already exists |
| **How to create** | In the creation window of a Document-type app item, disable the **Set version as current** option in the file upload area | In the view window of a Document-type app item: <br>- Add a version and disable the option to set it as current.<br>- Go to the version list and move an outdated version to drafts. |
| **How to open** | Open a Document-type app item created without a current version | In the view window of a Document-type app item, select **All versions > Drafts** in the side panel |
| **Online editing** | Available | Available |
| **Version creation on edit** | No | No |
| **Approval and information** | Available | Not available |
| **Setting as current version** | Available | Available |


## Work with a new document draft

Use this option if a document is being created for the first time and needs to be prepared before making it current.

### Step 1. Create a draft

1. In a **Document**-type app, click the button to add a new item. Its name is configured by your system administrator.

2. In the item creation window, disable the **Set the new version as the current one** option in the file upload area, and save the data.

When opening such a document, a notification appears stating that it has no current version.

### Step 2. Edit and prepare

In the view window of a Document-type app item, you can perform the following actions with a new document draft:

- Edit online. When you make edits, they are saved directly in the draft.

- Send for approval or information. Click **Send** on the top panel to forward the draft to colleagues before publishing.   
  
The system administrator can also set up draft submission for review using the [Approval](360010366380.md) and [Send Document/App Item](360010385600.md) activities during a business process triggered when adding an app item.

### Step 3. Publish the document

When the document is ready for publication, set it as current. You can do this in two ways:

1. Manually set the draft as the current version.  
  
To do this:

	1. In the view window of a Document-type app item, click **All Versions** in the **Document Versions** section on the side panel. 

	2. In the window that opens, click **Make Current**.  
  
Note that the system administrator can hide this button in the [Document versions widget settings](document-version.md#system-tab) using the **Read-only > Yes** option.

2. Automatically set the draft status to current using a script configured by the system administrator.   
  
For example, when setting up a business process, the system administrator adds a script to set the draft as the current version upon successful approval. To learn more about the method for changing the version status, see [BRIX TS SDK documentation](https://tssdk.brix365.com/en/latest/interfaces/_01_items_.fileversionitem.html#setascurrent).

## Work with a document version draft

A version draft allows you to prepare edits for an already published document without changing the current version for other users.

### Step 1. Create a version draft

You can prepare a version draft in two ways:

#### Upload a new document from your computer

1. In the view window of a Document-type item, click the plus icon on the top panel.   
Note that this icon is available for users with edit permissions for the app item.

2. In the window that opens, select a file to upload.

3. Disable the **Set new version as current** option.

4. Click **Create**.

#### Move an obsolete version to drafts

1. In the view window of a Document-type item, click **All versions** in the side panel and go to the **Outdated** tab.

2. Under the required version name, click **Reverse to Draft**. The version number will remain unchanged.

### Step 2. Edit a version draft

1. In the view window of a Document-type item, click **All Versions** on the side panel and open the **Drafts** tab.

2. Open the required draft by clicking its name.

3. Edit the file online. The changes will save directly in the draft.

### Step 3. Publish a version draft

When you finish editing the draft:

1. In the view window of a Document-type item, click **All Versions** on the side panel and open the **Drafts** tab.

2. Under the name of the prepared draft, click **Make Current**.  
  
Note that the system administrator can hide this button in the [Document versions widget settings](document-version.md#system-tab) using the **Read-only > Yes** option.

The draft will move to the **Current** tab and become the current working version of the document. The original edited version will appear on the **Outdated** tab. The version numbers remain unchanged.

