As can be seen by comparing the output of the last two commands, the "System.Collections.Hashtable" is not serialized and therefore the transition fails.
#create the fields object for a MultiGroupPicker/Multiselect/MultiUserPicker/VersionPicker field as can be found here: https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#creating-an-issue-examples
$service = @(1)
$service_key_hashtable = @{key = 'JIRA-13961'}
$service[0] = $service_key_hashtable
$fields = @{customfield_12200 = $service}
ConvertTo-Json $fields #output just to compare it to the HTTP request
{
"customfield_12200": [
{
"key": "JIRA-13961"
}
]
}
$newji = New-JiraIssue -Project "proj" -IssueType "Incident" -summary "summary"
$transition = $newji.Transition | where Name -eq "2nd level"
$resp = Invoke-JiraIssueTransition -Issue $newji -Transition $transition -Fields $fields -Verbose
ConvertTo-Json $requestBody -Depth 4
Increase the JSON transformation depth
Description
As can be seen by comparing the output of the last two commands, the "System.Collections.Hashtable" is not serialized and therefore the transition fails.
ConvertTo-Json $requestBody -Depth 5
Motivation and Context
Types of changes
Checklist