I am currently investigating how to migrate our helpdesk ticket data from JIRA to Visual Studio Online. As a test I used the workflow described below to do an initial import:
Migrate backlog items from ScrumWise to Visual Studio Online?
Unfortunately this does not allow me to change fields like the CreatedDate.
The REST API documentation has a section on how to use the bypassRules parameter that is supposed to enable me to force an update. Below is a simple PowerShell script that I used to try this parameter. Unfortunately it does not seem to work for me.
$username = "<username>"
$password = "<password>"
$basicAuth = ("{0}:{1}" -f $username,$password)
$basicAuth = [System.Text.Encoding]::UTF8.GetBytes($basicAuth)
$basicAuth = [System.Convert]::ToBase64String($basicAuth)
$headers = @{Authorization=("Basic {0}" -f $basicAuth)}
$Endpoint = "https://<domain>.visualstudio.com/defaultcollection/_apis/wit/workitems/12?api-version=1.0&bypassRules=true"
$Body = '[{"op": "add", "path": "/fields/System.CreatedDate", "value":"2007-01-01T00:00:00Z"}]'
$ContentType = "application/json-patch+json"
Invoke-RestMethod -Uri $Endpoint -headers $headers -Method Patch -Body $Body -ContentType $ContentType
The request completes with a success return code but the fields are not updated.
I double checked and am certain that I'm added to the "Project Collection Services Account" group.
Update: the bypassRules parameter works when I create a new work item instead of updating one.
Is there anybody that has had a similar issue and managed to get things working for work item updates?