I need to create around 6000 work items via my TFS extension. I use typescript and REST API in my extension.
below is the code I use to create work item
var ops = [ { path: "/fields/System.Title", op: "add", value: "Hello world" } ]; var options = { url: 'http://localhost:8080/tfs/DefaultCollection/Agile Git/_apis/wit/workItems/$Bug?api-version=2.2', username: 'username', password: 'password', domain: 'domain', method: 'PATCH', headers: { 'Content-Type': 'application/json-patch+json' }, body: JSON.stringify(ops) }; httpntlm.patch(options, function(err,res) { console.log("patch complete"); console.log(res.body); })
I iterate details for each work item and try to create bulk of work items, with time intervals (like 100 work items batches) . But creation process fails for many of work items with timeout problems (I was able to generate around 1000 work items). Is there recommended method to create / edit work items. Please help.