1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Azure DevOps で Basic Process で、Iteration を生成する

Posted at

背景

Basci Plan において、Iteration を作る際に powershell で作りたかったので調査した備忘録

スクリプト

  • start to end で月曜日から日曜日までの一週間後との iteration を作成
create iteration on basic process
# 設定
$organization = "https://dev.azure.com/organization"
$project = "Project"
$rootIteration = "\Project\Iteration\Sprint 1"
$startDate = [datetime]::Parse("2024-11-01")
$endDate = [datetime]::Parse("2024-11-30")

# devops config
az devops configure --defaults organization=$organization project=$project

# create iteration
$currentDate = $startDate
while ($currentDate -le $endDate) {
    $iterationName = "Iteration " + $currentDate.ToString("yyyy-MM-dd")
    $iterationPath = $rootIteration 
    $iterationStartDate = $currentDate
    $iterationEndDate = $currentDate.AddDays(6) # 日曜日まで
    if ($iterationEndDate -gt $endDate) {
        $iterationEndDate = $endDate
    }

    Write-Host "Creating iteration: $iterationName at $iterationPath from $iterationStartDate to $iterationEndDate"

    az boards iteration project create `
        --name "$iterationName" `
        --path "$iterationPath" `
        --start-date "$iterationStartDate" `
        --finish-date "$iterationEndDate"

    $currentDate = $currentDate.AddDays(7)
}

あとがき

agile とかの他のプロセスでもいけそうよね

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?