Closed joe-heaton closed 5 months ago
Further information from the Verbose as im still struggling, i can post debug too if that is useful but unsure where im going wrong. Seen a similar issue where the Headers was an Empty String? if this helps?
VERBOSE: [Invoke-JiraMethod] Post https://URL/rest/api/latest/issue/365436/transitions?maxResults=25
VERBOSE: [Invoke-JiraMethod] Failed to get an answer from the server
VERBOSE: [Test-ServerResponse] Checking response headers for authentication errors
VERBOSE: [Invoke-JiraMethod] Status code: BadRequest
VERBOSE: [Resolve-ErrorWebResponse] Function started
VERBOSE: [Resolve-ErrorWebResponse] Retrieved body of HTTP response for more information about the error
($responseBody)
Still issues with this,
Current Error message is :
customfield_13590 ----------------- Can not instantiate value of type [simple type, class com.atlassian.jira.issue.fields.rest.json.beans.CustomFieldOptionJsonBean] from JSON String; no single-String
constructor/factory method
Further information is i seem to be able to get .child.value and it give me what i want.
Name Value
---- -----
child {[value, User - Advice Given]}
value Site Support
get-jirafield "customfield_13590" - Output
Navigable : True
Orderable : True
ID : customfield_13590
Searchable : True
Custom : True
ClauseNames : {cf[13590], Closure Code, Closure Code[Select List (cascading)]}
Name : Closure Code
Schema : @{type=option-with-child; custom=com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect; customId=13590}
Further digging, the Validators for this transition is a "Build-Your-Own (Scripted)
!! issue.customfield_13590.child.value must return true
So are you trying to transition both Issue-14976 & Issue-14989?
@Rogueit so these are the customfields inside of the issue I'm trying to transition.
These are required to successfully transition the issue, both for customfield_13590 and one ID is the parent and the other the child.
So one thing I see that is different from the way i'm doing it is your ids are in single quotes. And maybe double quote resolution.
$transitionparams = @{
customfield_13590 = @{
id = '14976'
child = @{
id = '14989'
}
}
'customfield_10227' = $resolution
}
Cannot Transition due to Child option, using only the parent works fine but does require the child.
I have used value & id now, also have used as many different variations i can think of incl.
I must be missing something, but i am unsure how to add a single-string constructor/factory method as per error message given.
Following instructions HERE: https://atlassianps.org/docs/JiraPS/about/custom-fields.html#cascading-picker
This is the error recieved: