microsoft / microsoft/azure-devops-python-api
How to add new iteration to ADS project
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 684
- Fork
- 218
- Merge medio
- 8g 10h
- PR unite (30g)
- 1
Descrizione
Hello, I have an Azure DevOps project with multiple iteration paths:

If I use this Azure Python API to create a new work item and set /fields/System.IterationPath to have a value that already exists like RTC-ADS\PI28\Sprint 28-3 it will create the work item with no issue.
But if I try to create a work item with an iteration that does not yet exist such as RTC-ADS\PI27 it will fail with an error
ERROR:root:Error creating ADS work item: TF401347: Invalid tree name given for work item -1, field 'System.IterationPath'.
I could create PI27 manually in my Azure Project settings, but is there a way I can use this Azure Python API to create a new iteration value for PI27 by making a POST request or something?
I have found documentation supporting how to do so I believe:
https://docs.microsoft.com/en-us/rest/api/azure/devops/work/iterations/post-team-iteration?view=azure-devops-rest-6.0
But is it possible to add a new iteration value using this API? Thanks
jpo_path=str("/fields/System.IterationPath"),
jpo_value=str("RTC-ADS\PI27")Hello, I have an Azure DevOps project with multiple iteration paths:

If I use this Azure Python API to create a new work item and set /fields/System.IterationPath to have a value that already exists like RTC-ADS\PI28\Sprint 28-3 it will create the work item with no issue.
But if I try to create a work item with an iteration that does not yet exist such as RTC-ADS\PI27 it will fail with an error
ERROR:root:Error creating ADS work item: TF401347: Invalid tree name given for work item -1, field 'System.IterationPath'.
I could create PI27 manually in my Azure Project settings, but is there a way I can use this Azure Python API to create a new iteration value for PI27 by making a POST request or something?
I have found documentation supporting how to do so I believe:
https://docs.microsoft.com/en-us/rest/api/azure/devops/work/iterations/post-team-iteration?view=azure-devops-rest-6.0
But is it possible to add a new iteration value using this API? Thanks
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dall’endpoint REST di Azure DevOps collegato nell’issue, quindi verifica se la Python API espone un metodo client corrispondente per l’iterazione del team. Confronta i relativi parametri della richiesta e del percorso con la chiamata esistente per la creazione di un work item. Il lavoro è completo quando viene confermato se PI27 può essere creato tramite questa API e viene documentata o dimostrata la richiesta supportata, se possibile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, python
- Ambito
- api, devops
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 28/100