I'm trying to create the same queries across several projects. I feel like I'm almost there, but can't come up with the right 'thing' to create more than one query. I've tried "," ";" "AND" - and have managed to get it to create one but never both.
Could someone assist?? I've put down a quick example snippet of the type of thing I'm trying (which is why the fields are the same). If I can get that right, I'll use it for real with all the different queries I have (there's quite a few!)
{ $url1="https://dev.azure.com/[ORGANISATION]/$($project)/_apis/wit/queries/Shared Queries?api-version=6.0"
$JSON = @'
{
"name": "All User Stories JW6", "wiql": "SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State],[System.Tags],[Microsoft.VSTS.Scheduling.OriginalEstimate],[Microsoft.VSTS.Scheduling.CompletedWork] FROM workitems WHERE [System.WorkItemType] = 'User Story' AND [System.State] = 'Active' ORDER BY [System.WorkItemType]",
"name": "All User Stories JW7", "wiql": "SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State],[System.Tags],[Microsoft.VSTS.Scheduling.OriginalEstimate],[Microsoft.VSTS.Scheduling.CompletedWork] FROM workitems WHERE [System.WorkItemType] = 'User Story' AND [System.State] = 'Active' ORDER BY [System.WorkItemType]"
}
'@
