Setting parameters here
$transitionparams = @{
'customfield_13590' = @{
'id' = '14976'
child = @{
'id' = '14989'
}
}
'customfield_10227' = $resolution
If i remove the child, it accepts it but also requires the child to make the transition, feel like ive tried everything at this point. (Tried using value and/or id)
Finally the Invoke-JiraIssueTransition is below
Get-JiraIssue -Key $result.Key | Invoke-JiraIssueTransition -Transition 341 -Verbose
This is all using powershell
Hello @JoeHeaton
- Does it work if you set the child for the issue separately, then perform the transition?
- What happens when you try transitioning the issue using the raw Transition issue endpoint using a test tool like Postman?
- What happens why you try using PowerShell’s native Invoke-RestMethod method, not the method supplied by the JiraPS module?
- When you tried supplying the summary of the child issue via the Child field, did you try like this:
'customfield_13590' = @{
'value' = 'The top level value, not the id'
child = @{
'value' = 'The summary of the child issue, not the id'
}
}
Hi Thankyou for this response!
I the exact script working fine for another customfield_ that is Cascading Select Option with Child.
Is there any chance this could be access related?
- Invoke-RestMethod responds with same error unfortunately.
- Im not familiar with Postman but i can try it
- Supplying child seperately doesnt work as the error asks for both parent & child in one go
- I have tried values, ID and i feel every variation at this point, but knowing i have done it on another customfield option setup the same, makes me question access?
After more researching, i believe this to be related to the screen in which these fields are required on.
Screens require Administer permissions.
EDIT: Completely wrong assumption of mine, please ignore me. Still learning.
As a side topic, putting a field that is required for transition on a screen that only an admin can access does not seem like a very good issue management policy.
So you were right, that would be silly.
It is definitely how i am passing the JSON through the Powershell module which is the issue.
The main error i get is the following
Invoke-JiraMethod: 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
With $transitionparams being passed through as such:
Name Value
---- -----
customfield_13590 {[child, System.Collections.Hashtable], [value, Site Support]}
Resolution {[id, 10203]}
customfield_10227 Resolution Summary
Looking at this, it definitely isnt liking the system.collections.hashtable?