Open MartinBarkerPhilips opened 2 years ago
sorry to dig this up @MartinBarkerPhilips could you let me know where you imported that JsonPatchOperation() method from? I'm at a loss.
sorry to dig this up @MartinBarkerPhilips could you let me know where you imported that JsonPatchOperation() method from? I'm at a loss.
its been a while since i worked on this project, but i did end up figuring it out i remember and completing my rtc to ads migration tool. the script is here:
That above link is searching for "JsonPatchOperation" in the repo, which I can see being used in places like this:
from azure.devops.v5_0.work_item_tracking.models import JsonPatchOperation
Hope that helps!
@MartinBarkerPhilips thank you so much, your code absolutely helped me to get this moved along.
I am trying to use the azure-devops python pip package in order to migrate a large amount of Epic/Story/Feature tickets into Azure Devops. I can create singular tickets just fine, but I'm having trouble linking those tickets together by specifying the hierarchy (ticket A is a parent to child tickets B / C / D)
In order to create an EPIC ticket I'm running code like this:
Which works, but now I'm trying to figure out how to give this Epic ticket a linked Child ticket.
In the github repo for this azure-devops python package, I can see that in the definition for
create_work_item
there is a string variableexpand
which has an option forRelations
https://github.com/microsoft/azure-devops-python-api/blob/master/azure-devops/azure/devops/v5_1/work_item_tracking/work_item_tracking_client.py#L1578
It's also discussed in the official azure-devops documentation for the create_work_item function: https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/create?view=azure-devops-rest-6.0#workitemexpand
But if I add
expand='Relations'
to my code it results in an error:TypeError: WorkItemTrackingClient.create_work_item() got an unexpected keyword argument 'expand'
Am I using this 'expand' variable correctly? Or is there a different way I should add a child ticket to an epic in azure using python? Thanks