How to: Including a bunch of Work Items on Azure DevOps
This automation includes a bunch of Work Items on Azure using only four lines
This post represents a quick example that gives you the possibility to include many Work Items from a text file. This text file is separated by “pipe” (|). The sequence of fields that will be used is shown below:
- Work Item Type
- Team Project
The respective sample text file, as well as the automation, are available on GitHub. The automation code is below:
- PowerShell script will receive the following parameters:
- $PAT = Personal Access token to connect on Azure DevOps;
- $Organization = Organization URL to connect on Azure DevOps.
2. Read text file = read a file using delimiter ‘|’ and define columns WorkItemType, Title, TeamProject, Area, Iteration.
$data = Import-Csv -Delimiter '|' -Path "$home\desktop\wis.txt" -Header 'WorkItemType','Title','TeamProject','Area','Iteration'
3. az boards work-item create = use this command line to insert Work Items
az boards work-item create
4. After executing this sample text file, see the results on Azure DevOps: