---
schema_version: "1"
id: dbeb40a65e1f0c7714e02292a281a2058f9270c9a964a6aca8a32407c99c7f48
title: devops work-item prepare
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfclireference/guides/devops/cli_reference_devops_work-item_prepare.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_devops_work-item_prepare.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7628e4f6fc8af1964062f10a4599a430c3778c8f4313d8071a8a8fd272aa509a
products:
  - Salesforce CLI Command Reference
  - salesforcedx
---
<!-- prettier-ignore-start -->

# devops work-item prepare

Prepare a work item for one-off promotion between pipeline stages.

## Description for devops work-item prepare

Prepares a work item for one-off promotion by creating the necessary branches and pull requests in the source control repository. Run this command before running "sf devops work-item promote" for a one-off promotion.

Use "sf devops work-item list" to find the work item ID and target stage ID for a project.

## Flags

| Flag Name (Long) | Flag Name (Short) | Description |
|------------------|-------------------|-------------|
| <code>&#8209;&#8209;api&#8209;version</code> | N/A | **Type:** Value<br><br>Override the api version used for api requests made by this command |
| <code>&#8209;&#8209;flags&#8209;dir</code> | N/A | **Type:** Value<br><br>Import flag values from a directory. |
| <code>&#8209;&#8209;json</code> | N/A | **Type:** Boolean<br><br>Format output as json. |
| <code>&#8209;&#8209;target&#8209;org</code> | <code>&#8209;o</code> | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set. |
| <code>&#8209;&#8209;target&#8209;stage&#8209;id</code> | <code>&#8209;t</code> | **Type:** Value<br>**Required**<br><br>ID of the pipeline stage to promote the work item to. |
| <code>&#8209;&#8209;work&#8209;item&#8209;id</code> | <code>&#8209;i</code> | **Type:** Value<br>**Required**<br><br>ID of the work item to prepare for one-off promotion. |

## Examples for devops work-item prepare

Prepare a work item for one-off promotion to the UAT stage:

```shell
sf devops work-item prepare --target-org my-devops-org --work-item-id 0Wx000000000001 --target-stage-id 05S000000000002
```

Prepare a work item using a DevOps Center org username:

```shell
sf devops work-item prepare --target-org devops-center@example.com --work-item-id 0Wx000000000001 --target-stage-id 05S000000000002
```
<!-- prettier-ignore-end -->
