-1

If I want to create iteration under a project iteration. Like Project A has two iteration, WHICH is father iteration and Son iteration. How do I do it using the Azure shell --Bash ?

I don't know how to get the child id from the project.

Project A 
       Father Sprint 
              Father Sprint 1 
              Father Sprint 2
              Son Sprint 
                  Son-Sprint1
                  Son-Sprint2
Son sprint is the child sprint of father sprint




az boards iteration project update --path
                                       [--child-id]
                                       [--finish-date]
                                       [--name]
                                       [--project]
                                       [--start-date]
    
    
    
    az boards iteration project create --name
                                       [--finish-date]
                                       [--path]
                                       [--project]
                                       [--start-date]
    
    az boards iteration project create --name "Sprint 36" --start-date 2019-09-01 --finish-date 2019-09-30
    {
      "attributes": {
        "finishDate": "2019-09-30T00:00:00Z",
        "startDate": "2019-09-01T00:00:00Z"
      },
      "children": null,
      "hasChildren": false,
      "id": 55411,
      "identifier": "af3ef6a7-6551-451b-8f9f-63af7a60fc55",
      "name": "Sprint 36",
      "path": "\\Fabrikam Fiber\\Iteration\\Sprint 36",
      "structureType": "iteration",
      "url": "https://dev.azure.com/fabrikam/56af920d-393b-4236-9a07-24439ccaa85c/_apis/wit/classificationNodes/Iterations/Sprint%2036"
    }
TylerP
  • 9,600
  • 4
  • 39
  • 43
Shanks
  • 95
  • 9
  • Also, in the projectA How do I create Team A linked with Father Sprint iteration and Create Team B linked Son Sprint iteration in Azure shell using Azure bash? Thanks so much – Shanks Sep 27 '21 at 04:08

1 Answers1

3

You can use the command "az boards iteration project list" to list iterations for a project. From the output (JSON type content) of this command, you can get the details information (such as id, name, path, etc..) of all the existing iterations in the specified project.

enter image description here

[UPDATE]

You can do like as below to create the parent sprint and the child sprints:

  1. Use the following command to login to your Azure DevOps Organization. When running this command, you need to provide a valid PAT as the authentication.

    az devops login --org "https://dev.azure.com/{OrganizationName}"
    
  2. Use the following command to create the parent sprint under the root path.

    az boards iteration project create --name {ParentSprintName} --project {ProjectName} --start-date "{StartDate}" --finish-date "{FinishDate}"
    

    enter image description here

  3. Use the following command to create the child sprints under the parent sprint. Normally, the {RootName} is same as the {ProjectName} by default.

    az boards iteration project create --name {ChildSprintName} --project {ProjectName} --path "\\{RootName}\\Iteration\\{ParentSprintName}" --start-date "{StartDate}" --finish-date "{FinishDate}"
    

    enter image description here

Bright Ran-MSFT
  • 5,190
  • 1
  • 5
  • 12
  • Because from automation purpose, I need to create everything from scratch ----when you create everything from white paper, you need to create Father Sprint and Son Sprint in one Script. At the moment, they don't exist so you don't know the Child id. You only know the Child name is ChildSprint – Shanks Sep 27 '21 at 11:28
  • Hi @Shanks, I have updated my above answer with more details, please check it. Hope this can help you. – Bright Ran-MSFT Sep 27 '21 at 14:02
  • You are the best. Your answer is the best quality I have ever seen in Stack overflow. It perfects solve the question with step by step tutorial. I vote for your beautiful answer. Please, so great answer, if there is other people see it, give a up vote for this answer. So good – Shanks Sep 27 '21 at 17:09
  • @ Bright Ran-MSFT can you also help solve this question? thanks so much https://stackoverflow.com/questions/69383647/azure-devops-how-to-verify-whether-team-has-exists-in-an-organization-azure-cli – Shanks Sep 30 '21 at 23:16