Skip to main content

Cli tool to create child tasks on user stories in Azure DevOps.

Project description

az-create-tasks

Cli tool to create child tasks on user stories in azure boards.

Installation

pip install az-create-tasks

Usage

az-create-tasks [-h] [--parents <parent id> [<parent id> ...]]
                       [--area <area>] [--iteration <iteration>]
                       [--set <key>=<value>] [--values <value> [<value> ...]]
                       [--update-pat] [--dry-run] [-s]
                       <template file> <organization> <project>

az-create-tasks requires a YAML template file argument. A sample has been provided here.

The program expects the template file to have a single tasks key which will hold a list of all the tasks you wish to add to a single work item. Each task must follow this schema:

  • name: string Required, name of the task
  • assigned: string Email of the person assigned the task

Variable substitution

You can specify placeholder values in your template file by prefixing a $. There are two types of variables, ordered and named. Ordered variables are positive integers starting at 1. Named variables are custom names that can include alphabetical characters, numbers, or underscores. Named variables cannot start with a number.

The $ can be escaped with backslash \$ to treat it as a literal $.

You can provide values for these variables through the --values and --set options.

The --values option accepts a list of values and will substitute in order into $1, $2, $3, ... placeholders.

The --set option is used to set define individual key value pairs. For each custom variable name add:
--set <name>=<value>

Example --set reviewer="person@example.com".

Executing

It is recommended that you run your defined command with the --dry-run option first. This option will do two things:

  • Print the values for each task with variables substituted. Useful for checking if values are as expected.
  • Validate that the tasks with the given field values can be created without creating them. If the task cannot be created, an error will be thrown.

The first run of the program will prompt you to enter your Azure DevOps personal access token. Read here for how to create them. Copy and paste it into the terminal when prompted. If you need to change your access token, run the command with --update-pat to prompt for a new token.

Example: az-create-tasks sample-template.yaml MyOrg MyProject --values "developer@example.com" "reviewer@example.com" --parents 101 102 103

This command uses the provided template file and creates the defined tasks as children of work items 101, 102, and 103. All instances of $1 in the template were replaced with developer@example.com and all instances of $2 were replaced with reviewer@example.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

az_create_tasks-0.1.1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

az_create_tasks-0.1.1-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file az_create_tasks-0.1.1.tar.gz.

File metadata

  • Download URL: az_create_tasks-0.1.1.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for az_create_tasks-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4d6a150665a6e59e20ed55dd00db118e39cac0ac3ca294c83569581304d5604f
MD5 52df8192d1f51d9a4067554b75413389
BLAKE2b-256 1433d8abb013c14031625c9d07c94656c949019f62ddb875a04a79decf99bf9d

See more details on using hashes here.

File details

Details for the file az_create_tasks-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for az_create_tasks-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4586fdbeb33b85913f2f18b7d6dabc99433e02749c3cb671edf353788aa28bd1
MD5 5e59e8cacdbe66c163ec51d5a6437cbe
BLAKE2b-256 6e4b09c5d1041f89e1da413922f5cf19f65129a0e791589b3d0c6782cc9430da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page