Hello,
Im using JiraPS powershell module to interact with the tickets. I need to set a customfield value, the type is single-select. My syntax is exactly as described in the guide here https://atlassianps.org/docs/JiraPS/about/custom-fields.html
$field = @{
customfield_17700 = { id = 40409 }
}
or
$field = @{
customfield_17700 = { value = "Myvalue" }
}
But I always get this error:
Invoke-JiraMethod :
customfield_17700
-----------------
Could not find valid 'id' or 'value' in the Parent Option object.
At C:\lm\scripts\jira\lib\JiraPS.psm1:5505 char:21
+ Invoke-JiraMethod @parameter
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidResult: (:) [Invoke-JiraMethod], RuntimeException
+ FullyQualifiedErrorId : InvalidResponse.Status400,Invoke-JiraMethod
Any help would be appreciated.
Thanks
Problem solved. Syntax has to be a like this (new hash table inside the field)
$field = @{'customfield_17700' = @{ id = '40410'}}
This is missing in the documentation above.
Cheers Leos
I haven't used the JiraPS module much, but should you be using dot notation? In Groovy or Python, I'd expect to have to reference it something like issue.parent.id
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ken,
if you check the link I provided, it say to use the notation that I use. It works well for text field, like
$field = @{
customfield_17700 = "MyText"
}
However if the field is single-select, I cant update it still. Trying some options, but not successful yet.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.