You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.