# devops work-item combine

Prepare work items to be combined for custom promotion.

## Description for devops work-item combine

Use this command when work items in the same stage share metadata or have dependencies. DevOps Center combines the selected work items so they can be promoted together during custom promotion.

After running this command, use "sf devops work-item promote" with the parent work item ID to complete the promotion. The combined work items are promoted as a single unit.

## Flags

| Flag Name (Long)        | Flag Name (Short) | Description                                                                                                                                                                                                                                          |
| ----------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--api-version`         | N/A               | **Type:** Value<br><br>Override the api version used for api requests made by this command                                                                                                                                                           |
| `--child-work-item-id`  | N/A               | **Type:** Value<br>**Required**<br><br>ID of a work item to combine.<br><br>Specify this flag multiple times to combine multiple work items with the parent.                                                                                         |
| `--flags-dir`           | N/A               | **Type:** Value<br><br>Import flag values from a directory.                                                                                                                                                                                          |
| `--json`                | N/A               | **Type:** Boolean<br><br>Format output as json.                                                                                                                                                                                                      |
| `--parent-work-item-id` | N/A               | **Type:** Value<br>**Required**<br><br>ID of the parent work item.<br><br>The parent work item is the primary work item that continues through the pipeline. Changes from all child work items are merged into the parent's branch during promotion. |
| `--target-org`          | `-o`              | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set.                                                                                                  |
| `--target-stage-id`     | `-t`              | **Type:** Value<br>**Required**<br><br>ID of the pipeline stage to promote the combined work item to.                                                                                                                                                |

## Examples for devops work-item combine

Prepare three work items to be combined to prevent conflicts during promotion:

```shell
sf devops work-item combine --target-org my-devops-org --parent-work-item-id 0Wx000000000001 --child-work-item-id 0Wx000000000002 --child-work-item-id 0Wx000000000003 --target-stage-id 05S000000000002
```
